How to Delete All node_modules Directories

I found that deleting all the node_modules directories on my computer freed up about 16 GB of space on my hard drive. The following command will recursively delete them:

find . -name 'node_modules' -type d -prune -exec rm -rfv '{}' +

More info here.


To leave a comment, please visit the programming forum.