DEV Community

Discussion on: How to delete ALL node_modules folders on your machine and free up HD space!

Collapse
 
rhymes profile image
rhymes

Thanks!

With this you can see how much each node_modules directory occupies:

find . -name "node_modules" -type d -prune | xargs du -chs
Enter fullscreen mode Exit fullscreen mode

It will also tell you the total at the end of the command

Collapse
 
markpieszak profile image
Mark Pieszak

I like it !! Let me update the article with this in there. Definitely helpful 🙌

Collapse
 
carlillo profile image
Carlos Caballero

Thanks Mark!