Delete all node_modules folders recursively on Mac

Posted on 8/28/2016 @ 3:06 AM in #Apple by | Feedback | 3206 views

Modern node based dev has one big downside. LOTS and LOTS of disk space consumed with lots of node_modules folders.

Here is a command to delete them (no biggie, you can always get them back with npm install .. as long as you are online and not on a terrible internet connection).

find . -name "node_modules" -exec rm -rf '{}' +

(Thanks Onsel Akin)

Sound off but keep it civil:

Older comments..