Skip to content

Instantly share code, notes, and snippets.

@PatricNox
Created September 3, 2019 11:28
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 PatricNox/723d02b346ff4abb315a71fd8c09b7e9 to your computer and use it in GitHub Desktop.
Save PatricNox/723d02b346ff4abb315a71fd8c09b7e9 to your computer and use it in GitHub Desktop.
#!/bin/sh
#####
# These two shell commands goes through all subfolders in the current standing folder
# and deletes vendor & node_module folder.
####
# Recursively find and delete all folders called: "node_modules"
### Used by npm.
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
# Recursively find and delete all folders called: "vendor"
### Used by composer.
find . -name "vendor" -type d -prune -exec rm -rf '{}' +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment