Hello Stackers, This tool allows you to list any node_modules directories in your system, as well as the space they take up. You can then select which ones you want to erase to free up space. Yay!
Easily find and remove old and heavy node_modules folders ✨
npkill
Quick Start
$ npm i -g npkill
npkill
Examples
- Search node_modules directories in your projects directory:
npkill -d ~/projects # other alternative: cd ~/projects npkill
- List directories named “dist” and show errors if any occur:
npkill --target dist -e
- Displays the magenta color cursor… because I like magenta!
npkill --color magenta
- List vendor directories in your projects directory, sort by size, and show size in gb:
npkill -d '~/more projects' -gb --sort size --target vendor
- List node_modules in your projects directory, excluding the ones in progress and ignore-this directories:
npkill -d 'projects' --exclude "progress, ignore-this"
- Automatically delete all node_modules that have sneaked into your backups:
# Disabled for security reasons (you can use it in version 0.2.4 at your risk) npkill -d ~/backups/ --delete-all
Okay that’s All, for the full documentation you can visit here … cyaa …