Created
September 4, 2023 15:21
-
-
Save zlocate/9b54f06a0218907f35d5898aa7b76c67 to your computer and use it in GitHub Desktop.
Remove all node_modules dirs (https://dev.to/trilon/how-to-delete-all-nodemodules-folders-on-your-machine-43dh)
This file contains hidden or 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
| #!/bin/bash | |
| # Get node_modules dirs total size | |
| # find . -name "node_modules" -type d -prune -print | xargs du -chs / | |
| # Remove all node_modules dirs | |
| 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