Skip to content

Instantly share code, notes, and snippets.

@micktaiwan
Created April 11, 2019 22:58
Show Gist options
  • Save micktaiwan/bd4a2ff6891046e4a54f5286a275a79e to your computer and use it in GitHub Desktop.
Save micktaiwan/bd4a2ff6891046e4a54f5286a275a79e to your computer and use it in GitHub Desktop.
Cleaning cache for Meteor applications
#!/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