Free up space with npkill

Nowadays every front-end project involves the creation of a node_modules folder that is usually bigger than all the seasons of CSI in 720P. Take 10 of these projects that you started on a whim and your hard disk is now full.

We usually tend to forget to delete these node_modules when we aren't working on the project for a while so say hello to npkill, a simple package that allows you to interactively list and delete all the node_modules directories in your system.

Simply run,

npx npkill

in your terminal and by default it scans starting at the path where the command is executed. You can move between the listed folders using the arrow keys and use Space to delete the selected folder.

Press q once you're done cleaning up and enjoy that free space until your Mac cache fills it up again.