Scans a directory recursively for node_modules directories and reports how much disk space each one is using.
npm install -g toad_modules
toad_modules ~/Documents
This little one-liner will quietly delete every node_modules directory anywhere within your current working directory. It's a dangerous, destructive operation, so please consult your horoscope before copypasting this into your terminal.
toad_modules | grep -v TOTAL | awk '{ print $2; }' | xargs rm -r
It won't ask you if you're sure first. It will begin deleting almost immediately. But you seem like you know what you're doing, so go for it π
Contributors are subject to version 1.4 of the Contributor Covenant.
toad_modules is released under the MIT License.