mac-cleanup
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
- Cleanup Homebrew Cache
- Cleanup Any Old Versions of Gems
- Cleanup Dangling Docker Images
- Purge Inactive Memory
- Cleanup npm Cache
- Cleanup Yarn Cache
- Cleanup Docker Images and Stopped Containers
Install Automatically
Using curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/fwartner/mac-cleanup/master/installer.sh)"
Using wget
sh -c "$(wget https://raw.githubusercontent.com/fwartner/mac-cleanup/master/installer.sh -O -)"
Step by Step Install
- Download:
curl -o cleanup https://raw.githubusercontent.com/fwartner/mac-cleanup/master/cleanup.sh
- Make it executable:
chmod +x cleanup
- Move to make it globally usable:
sudo mv cleanup /usr/local/bin/cleanup
Update
curl -fsSL "https://raw.githubusercontent.com/fwartner/mac-cleanup/master/installer.sh" | bash -s update
Uninstall
curl -fsSL "https://raw.githubusercontent.com/fwartner/mac-cleanup/master/installer.sh" | bash -s uninstall