Created
April 11, 2019 22:58
-
-
Save micktaiwan/bd4a2ff6891046e4a54f5286a275a79e to your computer and use it in GitHub Desktop.
Cleaning cache for Meteor applications
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
#!/usr/bin/env bash | |
files=`find -type d -name "bundler-cache" -o -name "node_modules" -o -name "isopacks" -o -name ".npm" -o -name "plugin-cache" -o -name "build" -o -name ".build*"` | |
echo | |
#echo "========== bundler-cache $(#files[*])" | |
for file in $files | |
do | |
if [ -e $file ]; then # because if we delete "node_modules", subdirectories "node_modules" could have already been deleted | |
echo `du -sh --total "$file"` | |
sudo rm -drf "$file" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment