Skip to content

Instantly share code, notes, and snippets.

@vreality64
Created November 28, 2019 01:39
Show Gist options
  • Save vreality64/ddbc4fbe88e56b5421da83f0ab3053c4 to your computer and use it in GitHub Desktop.
Save vreality64/ddbc4fbe88e56b5421da83f0ab3053c4 to your computer and use it in GitHub Desktop.
Clean up node_modules directory
# Show all node_modules folder information in current working directory
alias show-all-node-modules="find . -name 'node_modules' -type d -prune -print | xargs du -chs"
# Remove all node_modules folder in current working directory
alias remove-all-node-modules="show-all-node-modules && find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \;"
@vreality64
Copy link
Author

Running GIF

Terminal recording looks weired due to font issue. I recommend to see it external links 😄

show all node modules

show-all-node-modules | Terminalizer.com

show-all-node-modules

remove all node modules

remove-all-node-modules | Terminalizer.com

remove-all-node-mudules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment