I use this always before backing up my ~code dir:

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

Comments