Created
January 6, 2026 22:35
-
-
Save johnjreiser/bbf7ee047db2ce31639d82ac685cf918 to your computer and use it in GitHub Desktop.
cleanup.sh - remove common caches and large files on macOS
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
| #/bin/bash | |
| set -e | |
| echo Cleaning up Python pip cache... | |
| pip cache purge | |
| echo Cleaning up Node.js npm cache... | |
| npm cache clean --force | |
| echo Cleaning up Docker data... | |
| docker system prune -f | |
| docker scout cache prune --sboms | |
| echo Cleaning up Homebrew data... | |
| brew cleanup | |
| echo Cleaning up Apple Mail logs... | |
| APPLE_MAIL_LOG_DIR=~/Library/Containers/com.apple.mail/Data/Library/Logs/Mail | |
| ls ${APPLE_MAIL_LOG_DIR}/*.txt | |
| rm -f ${APPLE_MAIL_LOG_DIR}/*.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment