If you would like to delete all node_modules and bower_components in all directories relative to the current, use the following commands:
1 2 |
find . -name "node_modules" -type d -prune -exec rm -rf '{}' + find . -name "bower_components" -type d -prune -exec rm -rf '{}' + |