A cleanup script for macOS that runs the following tasks:
use without installing
sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/031nna/mac-cleanup/master/cleanup.sh)"It does the following cleanup 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
- Remove Minecraft logs and cache
- Remove Steam logs and cache
- Remove Lunar Client logs and cache
- Remove Microsoft Teams logs and cache
- Remove Wget logs and hosts
- Removes Cacher logs
- Deletes Android caches
- Clears Gradle caches
- Deletes Kite logs
- Clears Go module cache
brew tap fwartner/tap
brew install fwartner/tap/mac-cleanupsh -c "$(wget https://raw.githubusercontent.com/031nna/mac-cleanup/master/installer.sh -O -)"Download:
curl -o cleanup https://raw.githubusercontent.com/031nna/mac-cleanup/master/cleanup.sh
Make it executable:
chmod +x cleanup
Move to make it globally usable:
sudo mv cleanup /usr/local/bin/cleanup
curl -fsSL "https://raw.githubusercontent.com/031nna/mac-cleanup/master/installer.sh" | bash -s uninstall- Download:
curl -o cleanup https://raw.githubusercontent.com/mac-cleanup/mac-cleanup-sh/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/031nna/mac-cleanup/master/installer.sh" | bash -s updatecurl -fsSL "https://raw.githubusercontent.com/mac-cleanup/mac-cleanup-sh/main/installer.sh" | bash -s uninstallHelp menu:
$ mac-cleanup -h
A Mac Cleanup Utility by fwartner
https://github.com/mac-cleanup/mac-cleanup-sh
USAGE:
mac-cleanup [FLAGS]
FLAGS:
-h, prints help menu
-n no brew updates
This project exists thanks to all the people who contribute.
If you like what I am doing please consider sponsor my work!