Homebrew Cheatsheet - macOS Package Manager Reference

All essential Homebrew commands organized by use case, with 38+ entries you can copy and run directly. Find the right command fast when you need it.

Dev Tools·38 commands·Last updated 2026-07-21
Back to Dev Tools

Basics 12

brew install wget
Install a CLI tool
brew uninstall wget
Uninstall
brew update
Update Homebrew itself
brew upgrade
Upgrade all installed packages
brew upgrade wget
Upgrade a specific package
brew list
List installed
brew info wget
View package info
brew search nginx
Search for a package
brew cleanup
Clean up old-version caches
brew outdated
See upgradable packages
brew reinstall wget
Reinstall (fix corruption)
brew autoremove
Auto-remove unneeded dependencies

Cask GUI Apps 5

brew install --cask visual-studio-code
Install a GUI app
brew uninstall --cask visual-studio-code
Uninstall a GUI app
brew list --cask
List installed GUI apps
brew search --cask chrome
Search for GUI apps
brew upgrade --cask
Upgrade all GUI apps

Services 5

brew services list
List all service statuses
brew services start mysql
Start and enable on boot
brew services stop mysql
Stop a service
brew services restart mysql
Restart a service
brew services run mysql
Run without enabling on boot

Taps & Mirrors 5

brew tap homebrew/cask-fonts
Add a third-party tap
brew untap homebrew/cask-fonts
Remove a third-party tap
brew tap
List added taps
export HOMEBREW_API_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api"
Switch API mirror temporarily
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"
Switch Bottle mirror temporarily

Troubleshooting 7

brew doctor
Check environment issues
brew config
View Homebrew config
brew deps wget
View dependencies
brew pin wget
Pin a version (no upgrade)
brew unpin wget
Unpin a version
brew leaves
See top-level manually installed packages
brew uses --installed wget
See which installed packages depend on it

Bundle Management 4

brew bundle dump
Dump installed list to Brewfile
brew bundle install
Install from Brewfile in batch
brew bundle cleanup
Clean up packages not in Brewfile
brew bundle check
Check if Brewfile dependencies are met

Tips

  • 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

Commands are compiled from the official docs below. Click to verify the latest usage.

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