DEV Community

Discussion on: Delete Node Modules like a PRO 😎

Collapse
 
shinigami92 profile image
Shinigami

npx npkill can recursively traverse your directories
So you can use it from e.g. your HOME folder and then remove every unnecessary node_modules in every directory/project

Collapse
 
mpetuska profile image
Martynas Petuška

So can rm -rf **/node_modules

Thread Thread
 
shinigami92 profile image
Shinigami

This will remove everything without any control

With npkill you can select each node_modules individually

Try it and you will see what I mean