Homebrew Cheatsheet - macOS Package Manager Reference
A fresh Mac loses hours to $PATH and dependency mess unless you install through Homebrew. This reference covers installing/updating/removing formulas, Cask GUI apps, brew services for background daemons, mirror switches for mainland use and troubleshooting broken bottles. Unlike a package list, it tells you which flag installs from HEAD vs a bottle, and how to diagnose a brew doctor complaint. After reading you can bootstrap and repair a Mac toolchain mostly from the terminal.
Basics 12
brew install wgetbrew uninstall wgetbrew updatebrew upgradebrew upgrade wgetbrew listbrew info wgetbrew search nginxbrew cleanupbrew outdatedbrew reinstall wgetbrew autoremoveCask GUI Apps 5
brew install --cask visual-studio-codebrew uninstall --cask visual-studio-codebrew list --caskbrew search --cask chromebrew upgrade --caskServices 5
brew services listbrew services start mysqlbrew services stop mysqlbrew services restart mysqlbrew services run mysqlTaps & Mirrors 5
brew tap homebrew/cask-fontsbrew untap homebrew/cask-fontsbrew tapexport HOMEBREW_API_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api"export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"Troubleshooting 7
brew doctorbrew configbrew deps wgetbrew pin wgetbrew unpin wgetbrew leavesbrew uses --installed wgetBundle Management 4
brew bundle dumpbrew bundle installbrew bundle cleanupbrew bundle checkTips
- On slow networks, switch mirrors before install, or bottle downloads often time out.
- Services managed by brew services live in ~/Library/LaunchAgents/; check there if something breaks.
- brew cleanup deletes old versions and download caches; run it when disk is tight.
Official References
Each command links to its official documentation below, so you can verify the latest usage and read deeper.
Maintained by LaoHand
Publicly updated on Jul 21, 2026, continuously proofread against official docs.
Contact Us
Wrong command or description? Send us corrections, business inquiries or product feedback by email.
Contact Us