bossboss2021.clear_modules
v1.1.0
Published
clear_modules is a light-weight node.js application that allows you to easily search for and delete `node_modules` folders to easily free up space.
Readme
clear_modules
What is it?
clear_modules is a light-weight node.js application that allows you to easily search for and delete node_modules folders to easily free up space.
Performance
clear_modules takes less than a second for each item scanned (on average).
Note: When scanning root, skip over /mnt, /usr and /opt for higher performance with the --skip-sys flag!
| Note: Due to a slight bug, using --skip-sys will also skip over all directories named mnt, usr or opt and their descendants.
Installation
To install, simply run:
- Linux:
npm i bossboss2021.clear_modules && sudo npm link bossboss2021.clear_modulesin a safe directory. Make sure not to delete thenode_modulesfolder where clear_modules is installed with clearmodules - Windows:
npm i bossboss2021.clear_modules, followed bynpm link bossboss2021.clear_modulesin a terminal with Administrator permissions. Make sure not to delete thenode_modulesfolder where clear_modules is installed with clearmodules
Usage
To scan for node_modules folders, run: clearmodules scan <base_directory> (ex. clearmodules scan ~).
To scan and delete all node_modules folders, run: clearmodules clear <base_directory> (ex. clearmodules clear ~). This will wait for confirmation.
For a help message, do clearmodules help.
Note: When scanning, clearmodules automatically skips over directories named proc, boot, etc, var, tmp, bin, dev and sys.
