Created
October 17, 2023 06:23
-
-
Save hongqn/886a162041e49d47d5cbed6fee73a5c5 to your computer and use it in GitHub Desktop.
This file contains 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 zsh | |
autoload colors; colors | |
run() { | |
local cmd="$1" | |
echo "🏃 $fg[green]$cmd$reset_color" | |
eval "$1" | |
} | |
run "docker system prune -f" | |
run "docker volume prune -f" | |
run "pip cache purge" | |
run "brew cleanup --prune=all" | |
run "yarn cache clean" | |
run "xcrun simctl delete unavailable" | |
run "rm -rf ~/Library/Developer/Xcode/DerivedData/*" | |
run "rm -rf ~/Library/Developer/CoreSimulator/Caches/*" | |
run "find ~/Downloads -type f -atime +60 -delete" | |
run "find ~/Downloads -empty -type d -atime +30 -delete" | |
run "rm -rf ~/.Trash/{*,.*}" | |
run "rm -rf ~/tmp/{*,.*}" | |
echo | |
echo "💡 $fg[green]Some further steps you can take to free more space:$reset_color" | |
echo "👉 Use DaisyDisk to find large files" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment