DEV Community

Discussion on: ♻️ Delete unused node_modules in a second and enjoy some free space!

Collapse
 
moopet profile image
Ben Sinclair

If you really want to save space, you could always run the npx command without the install first... or maybe find . -type d -name node_modules | xargs du -sh

Collapse
 
skylersaville profile image
Skyler Saville

I was wonder why you would use npx after globally installing it. Using the npx command by itself seems a much better practice.

Collapse
 
balastrong profile image
Leonardo Montini

That's indeed correct, this will save you an extra 1.9MB of space.

Not a life changer as the many GB you will free a few seconds later, but still a valid suggestion. Thank you for sharing! :)