Homebrew Commands

Homebrew commands cheatsheet.

Install packages and apps, upgrade everything, and keep brew healthy — the commands you need. Tap to copy.

Packages
brew install <pkg>Install a formula
brew uninstall <pkg>Remove a formula
brew search <text>Search for formulae and casks
brew info <pkg>Show details about a package
brew listList installed packages
Apps (casks)
brew install --cask <app>Install a macOS app via cask
brew uninstall --cask <app>Remove a cask app
brew list --caskList installed cask apps
Updating
brew updateUpdate Homebrew and formula definitions
brew upgradeUpgrade all outdated packages
brew upgrade <pkg>Upgrade a single package
brew outdatedShow packages with updates available
brew pin <pkg>Stop a package from being upgraded
Maintenance
brew doctorCheck your setup for common problems
brew cleanupRemove old versions and free up space
brew --prefixPrint the Homebrew install path

The Mac package manager

Homebrew installs command-line tools with brew install and full macOS apps with brew install --cask. Keep things current with brew update (refreshes definitions) followed by brew upgrade (updates packages), and run brew doctor if something seems off.

FAQ

What's the difference between brew install and brew install --cask?
Plain brew install adds command-line formulae; brew install --cask installs graphical macOS applications like browsers and editors.
What does brew update vs brew upgrade do?
brew update refreshes Homebrew itself and its list of available packages; brew upgrade actually installs newer versions of the packages you have.

More cheatsheets