Created
April 27, 2021 14:17
-
-
Save ruanmartinelli/f5a0ab0c78809c91503de199c1dc735e to your computer and use it in GitHub Desktop.
Clean up your `node_modules` folder to free up space 🧹
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MacOS only! | |
# Go to parent folder | |
cd /my/folder/ | |
# List the total size of all node_modules folders | |
find . -name "node_modules" -type d -prune -print | xargs du -chs | |
# Delete all node_modules folder (danger! irreversible) | |
find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment