What is npKill? π
npKill is a fantastic tool designed to help you find and remove old and heavy node_modules folders from your system. If you're like most developers, your projects can accumulate a lot of unnecessary files, and npKill can help you declutter and free up valuable space.
Why Use npKill? π€
As developers, we often jump between various projects, and each one has its own node_modules folder. Over time, these can take up significant space on your hard drive. Hereβs how npKill can make your life easier:
- Clear Space: Easily identify and remove old node_modules directories that are no longer needed.
- Workspace Usage: Check when you last modified files in a workspace with the last_mod column.
- Fast Performance: Written in TypeScript with low-level searches for optimal performance.
- User-Friendly: No complicated commandsβjust list your node_modules and press Del to remove them.
- Minimal Dependencies: Lightweight and efficient.
Features at a Glance π
- Easily Clear Space: Remove those bulky node_modules folders with a simple command.
- Last Workspace Usage: See the last time you modified a file in each workspace.
- High Speed: Enjoy quick searches and deletions, thanks to low-level performance optimizations.
- Ease of Use: Navigate and delete folders with simple key commands.
- Minimal Dependencies: Keep your system lean with a lightweight tool.
How to Install npKill π¦
You donβt need to install npKill to use it! Simply run:
bash
Copy code
$ npx npkill
But if you prefer to install it globally:
bash
Copy code
$ npm i -g npkill
# Unix users may need to run the command with sudo.
Note: NPKILL does not support node versions less than 14. For older versions, use npkill@0.8.3.
How to Use npKill π οΈ
Using npKill is straightforward:
bash
Copy code
$ npx npkill
# Or just npkill if installed globally
By default, npKill will start scanning for node_modules directories from the path where the command is executed. You can navigate the list with the β and β keys, and delete a folder by pressing Space or Del. Open the directory with o, and exit with Q or Ctrl + c.
Important Reminder β οΈ
Some applications require their node_modules directory to function correctly. npKill will highlight these with a β οΈ symbol to remind you to proceed with caution.
Conclusion π
npKill is an indispensable tool for any developer looking to maintain a clean and efficient workspace. Give it a try and see how much space you can reclaim!
Happy coding! π¨βπ»π©βπ»
For more details, visit the npKill page on npm.
Top comments (0)