rm -rf node-modules does the job too
rm -rf node-modules
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
npx npkill
So can rm -rf **/node_modules
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
node_modules
does it delete all the node_modules in the directory? No it doesn't
No it does not :-). It is rm -rf node_modules does
rm -rf node_modules
rm -r node-modules this should work
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
rm -rf node-modulesdoes the job toonpx npkillcan recursively traverse your directoriesSo you can use it from e.g. your HOME folder and then remove every unnecessary node_modules in every directory/project
So can rm -rf **/node_modules
This will remove everything without any control
With npkill you can select each
node_modulesindividuallyTry it and you will see what I mean
does it delete all the node_modules in the directory? No it doesn't
No it does not :-). It is
rm -rf node_modulesdoesrm -r node-modules this should work