A one-command deep clean and tune-up for your Mac. optimize_pro.sh
automates the maintenance routine power users normally run by hand: cache
cleanup, memory purge, DNS flush, local Time Machine snapshot cleanup,
Homebrew upkeep, Spotlight reindexing, and a disk check.
📖 Read the full documentation — what each step does, in plain language.
This script goes deep, so a few steps free up space by clearing things out for good (caches, logs, local Time Machine snapshots) — the same cleanup a power user would do by hand, just automated. As with any system maintenance, it's good practice to have a recent backup on hand.
- macOS
- An account with administrator rights (the script prompts for your
password via
sudo) - Homebrew (optional — the Homebrew maintenance step is
skipped if
brewis not installed)
chmod +x optimize_pro.sh
./optimize_pro.shThe script asks for confirmation before starting, then for your administrator password (kept alive for the session for the duration of the run).
- Clean system, user, and log caches
- Clean system temporary files
- Purge RAM
- Flush the DNS cache
- Remove local Time Machine snapshots
- Homebrew maintenance (update / upgrade / autoremove / cleanup)
- Reindex Spotlight
- Verify the disk's file system
A detailed breakdown of each procedure (commands used, effects, impact) is documented on the documentation site (source: docs/index.html).
Contributions are welcome. See CONTRIBUTING.md for the guidelines to follow before opening a pull request.
Distributed under the GPL-3.0 license — see LICENSE.