wipe-node-modules
v1.0.4
Published
π Fancy CLI tool to recursively find and delete node_modules folders with size calculation and parallel deletion
Maintainers
Readme
π wipe-node-modules
Fancy CLI tool to recursively find and delete
node_modulesfolders with style, speed, and safety.
β¨ Features
- π Recursive scan for all
node_modules(including nested) - π Interactive selection (checkbox UI)
- π¨ Beautiful CLI (colors, spinners)
- β‘ Parallel deletion (multi-core performance)
- π Folder size calculation before deletion
- πΎ Total space freed after cleanup
- β οΈ Warns when no path is provided (uses current directory)
π¦ Installation
Global install
npm install -g wipe-node-modulesRun with npx
npx wipe-node-modulesπ Usage
wipe-node-modules [path]Examples
1. Run in current directory
wipe-node-modulesβ οΈ Shows warning and scans current folder
2. Provide a specific path
wipe-node-modules ./my-projectπ§ How it works
Scans for all
node_modulesfoldersDisplays them with:
- index number
- full path
- folder size
Prompts you to:
- Delete all
- Select specific folders
- Exit
Deletes selected folders in parallel
Shows:
- total deleted folders
- total disk space freed
π₯οΈ CLI Preview
Node Modules Cleaner
β οΈ No path provided, using current directory
β Found 5 folders
? Choose action:
β― Delete All
Select Manually
Exit
? Select folders to delete:
β 1. /project/a/node_modules (120 MB)
β― 2. /project/b/node_modules (80 MB)
ποΈ Deleting...
β
Deleted: 2
πΎ Freed: 200 MBβοΈ Requirements
- Node.js >= 16
π§ͺ Development
git clone https://github.com/ELAVARASAN-23/wipe-node-modules.git
cd wipe-node-modules
npm install
npm linkRun locally:
wipe-node-modulesπ Versioning
This project follows Semantic Versioning:
patchβ bug fixesminorβ new featuresmajorβ breaking changes
π Publish
npm login
npm publish --access publicπ·οΈ Badges
π Roadmap
- [ ] Dry-run mode (
--dry-run) - [ ] Ignore rules (
.dnmignore) - [ ] Sort by largest folders
- [ ] Windows optimization improvements
π€ Contributing
Pull requests are welcome! For major changes, open an issue first to discuss.
π License
MIT Β© Elavarasan
