Tip to free up gigabytes of space if you are a Node.js developer

2 points by santiagogo ↗ HN
Crawl (cd) to the folder where you have you node projects (eg. /dev) and then just run the following command:

find . -type d -name node_modules -exec rm -rf {} +

Works great before backing up or moving files.

2 comments

[ 1.9 ms ] story [ 14.2 ms ] thread
Also, upgrading to NPM >= 3 is a big deal for storage space as it flattens node_modules by default, which means fewer duplicate copies of some of the shared libraries you use. (It also means fewer long path issues for us Windows users.)