Kill every node_modules with npkill

Hari Prasad
featurepreneur
Published in
2 min readJun 23, 2021

When we work on Js projects, we need to install the dependencies required for our projects using npm. These dependencies are stored in the node_modules folder which contains a lot of files inside it.

When the projects get old or outdated, we forget about that and move on, which will end up taking a lot of space in our system. We can’t delete the project, but we can delete the node_modules. Finding all the node_modules and deleting them is a tedious process.

Here comes npkill into the scene. It can easily find all the node_modules in our system and delete them.

First, install npkill by entering the below command in Terminal

sudo npm install -g npkill

Now, go to the Home Directory and enter npkill

npkill

It will find all the node_modules and list them.

Use arrow keys to move up and down and press the space button to delete the specific node_modules folder.

Thank you for reading. I hope it was useful.

--

--