Delete unused node_modules

Created: October 09, 2022 01:12 AM

We all have a lot of unfinished projects that are laying around and taking useful storage space, and we also know that the folder node_modules is the most heavy thing in the universe.


It's hard to find all these unfinished JavaScript projects and delete there node_modules one by one, npkill fix this issue by locating all the node_modules in your system, then you can choose what to delete or keep easily.

Now, the installation part.

We will install it globaly so we can run it from everywhere

  npm install -g npkill

Then go to your projects directory for example and open a terminal window and run


npkill will scan and find all the node_modules and list them, you can navigate them with the arrow keys, to delete a node_modules folder just press the space bar, and you're done.

I saved around 15gb just by doing this.