Skip to content

Instantly share code, notes, and snippets.

@beeva-manueldepaz
Created May 22, 2016 10:27
Show Gist options
  • Save beeva-manueldepaz/99ea360c87f7dd83cf9d90a35ed3b4ff to your computer and use it in GitHub Desktop.
Save beeva-manueldepaz/99ea360c87f7dd83cf9d90a35ed3b4ff to your computer and use it in GitHub Desktop.
Script to clean all npm & bower current instalations in a folder recursively
#!/bin/sh
# https://coderwall.com/p/guqrca/remove-all-node_module-folders-recursively
# $sudo mv /path/to/killAllNodeModules.sh /usr/local/bin/killAllNodeModules
# $sudo chmod a+x /usr/local/bin/killAllNodeModules
find . -name "node_modules" -exec rm -rf '{}' +
find . -name "bower_components" -exec rm -rf '{}' +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment