A cleanup script for macOS that runs the following tasks:
- Empty the Trash on All Mounted Volumes and the Main HDD
- Clear System Log Files
- Clear Adobe Cache Files
- Cleanup iOS Applications
- Remove iOS Device Backups
- Cleanup Xcode Derived Data and Archives
- Reset iOS simulators
- Cleanup Homebrew Cache
- Cleanup Any Old Versions of Gems
- Cleanup Dangling Docker Images
- Purge Inactive Memory
- Cleanup pip cache
- Cleanup Pyenv-VirtualEnv Cache
- Cleanup npm Cache
- Cleanup Yarn Cache
- Cleanup Docker Images and Stopped Containers
- Cleanup CocoaPods Cache Files
- Cleanup composer cache
- Cleanup Dropbox cache
- Remove PhpStorm logs
brew tap fwartner/tap
brew install fwartner/tap/mac-cleanup
sh -c "$(curl -fsSL https://raw.githubusercontent.com/fwartner/mac-cleanup/main/installer.sh)"
sh -c "$(wget https://raw.githubusercontent.com/fwartner/mac-cleanup/main/installer.sh -O -)"
- Download:
curl -o cleanup https://raw.githubusercontent.com/fwartner/mac-cleanup/main/mac-cleanup
- Make it executable:
chmod +x cleanup
- Move to make it globally usable:
sudo mv cleanup /usr/local/bin/cleanup
If installing with curl you need to call cleanup
instead of mac-cleanup
.
curl -fsSL "https://raw.githubusercontent.com/fwartner/mac-cleanup/main/installer.sh" | bash -s update
curl -fsSL "https://raw.githubusercontent.com/fwartner/mac-cleanup/main/installer.sh" | bash -s uninstall
Help menu:
$ mac-cleanup -h
A Mac Cleanup Utility by fwartner
https://github.com/fwartner/mac-cleanup
USAGE:
mac-cleanup [FLAGS]
FLAGS:
-h, prints help menu
-n no brew updates
Clean up without homebrew updates:
$ mac-cleanup -n
This project exists thanks to all the people who contribute. [Contribute].
Become a financial contributor and help us sustain our community. [Contribute]
Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]
If you like what I am doing please consider sponsor my work!