Last active
December 7, 2019 20:43
-
-
Save asmattic/34dc81643641cf7f530e8de0daa00ac2 to your computer and use it in GitHub Desktop.
Recursively remove node_module directories from a parent folder
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
# SOURCE: https://rtmccormick.com/2018/01/10/clear-node-modules-folders-recursively-mac-linux/ | |
find . -name "node_modules" -type d -prune -exec rm -rf '{}' + | |
# To recursively restore node_modules (DO NOT USE - STILL IN PROGRESS) | |
find . -name "package.json" -type f -prune -exec npm i '{}' + |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment