Last active
January 26, 2024 18:59
-
-
Save josethz00/0bae6e5ef4d6eb9be72ce59b82b23c58 to your computer and use it in GitHub Desktop.
Revisions
-
josethz00 revised this gist
Jan 26, 2024 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,9 +2,13 @@ echo "Searching for node_modules directories..." # Assuming NVM is installed in the default location, update this if you have a custom NVM directory NVM_DIR="$HOME/.nvm" # exclude nvm find $HOME -path $NVM_DIR -prune -o -name "node_modules" -type d -print | while read dir; do echo "Deleting $dir..." rm -rf "$dir" done echo "All node_modules directories have been deleted." -
josethz00 created this gist
Jan 26, 2024 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ #!/bin/bash echo "Searching for node_modules directories..." find $HOME -name "node_modules" -type d -prune | while read dir; do echo "Deleting $dir..." rm -rf "$dir" done echo "All node_modules directories have been deleted."