DEV Community

Lumin
Lumin

Posted on

How to get back your OSX storage from node_modules

inside node_nodules

just run

find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}';
Enter fullscreen mode Exit fullscreen mode

Note:

print all node_modules folder with it's size

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

Top comments (0)