nmclear
is a Bash script that traverses all subdirectories within the current directory, finds node_modules
directories, and offers to delete them to save space.
This script is helpful for developers working with Node.js projects, where node_modules
directories can take up a significant amount of disk space.
You can install nmclear
with Homebrew. If you don't have Homebrew installed, you can install it with the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Once Homebrew is installed, you can install nmclear with these commands:
brew tap gthrm/nmclear
brew install nmclear
This will download the nmclear script and make it executable from any directory.
To use nmclear, navigate to the directory that you want to clean up, and then run:
nmclear
The script will find all node_modules
directories and print their paths. It will then ask for confirmation before deleting them. If you answer y
or yes
, it will delete the directories; if you answer n
or no
, it will leave them alone.
Please use this script with caution, as deleting node_modules
directories can break Node.js projects if they are not properly reinstalled.
You can update nmclear
to the latest version with this command:
brew upgrade nmclear
If you encounter any problems or have any suggestions, please open an issue on GitHub.
nmclear
is released under the MIT License. See the LICENSE file for more details.
This README explains what the script does, how to install and use it, how to update it, where to get support, and the license terms. It's a good starting point, but feel free to modify it to suit your needs.