Skip to content

Instantly share code, notes, and snippets.

@john20xdoe
Created July 9, 2018 01:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save john20xdoe/ca7ec389cdbe432354a82abd034149b7 to your computer and use it in GitHub Desktop.
Save john20xdoe/ca7ec389cdbe432354a82abd034149b7 to your computer and use it in GitHub Desktop.
Remove all node_modules recursively using bash
# based on https://coderwall.com/p/guqrca/remove-all-node_module-folders-recursively
# Run this inside the parent folder containing your node projects.
# -prune lets the command not have to go into the children node_mdules.
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment