Skip to main content

Homebrew Package Manager Cheatsheet

Homebrew is the most popular package manager for macOS (also available on Linux). This cheatsheet covers daily brew operations including Formula and Cask installation, uninstallation, updates, dependency management, and Tap repository configuration.

Updated: 2026-07-17·30 commands

Overview

Homebrew is a free and open-source package management system for macOS (and Linux). It simplifies the installation of software on Apple's operating system. This cheatsheet covers package management, casks, taps, and system maintenance.

Quick Start

``bash brew install wget # Install a package brew search python # Search for a package brew update && brew upgrade # Update everything ``

Refer to the command table below for detailed usage.

Basic Ops(9)

CommandLevel
brew install <formula>
Install a Formula package
Basic
brew uninstall <formula>
Uninstall a Formula package
Basic
brew update
Update Homebrew itself and Formula lists
Basic
brew upgrade
Upgrade all outdated packages
Basic
brew outdated
List all outdated packages
Basic
brew list
List all installed packages
Basic
brew search <text>
Search Formulae or Casks
Basic
brew --version
Show Homebrew version
Basic
brew config
Display Homebrew configuration
Basic

Formula(9)

CommandLevel
brew info <formula>
Show package details
Basic
brew deps <formula>
Show package dependencies
Intermediate
brew deps --tree <formula>
Show dependencies as a tree
Intermediate
brew uses <formula>
Show which packages depend on the given formula
Intermediate
brew pin <formula>
Pin package version to prevent upgrades
Intermediate
brew unpin <formula>
Unpin package version
Intermediate
brew leaves
List top-level packages not depended on by others
Intermediate
brew link --overwrite <formula>
Force link (overwrite conflicting files)
Expert
brew unlink <formula>
Unlink a package
Intermediate

Maintenance(7)

CommandLevel
brew doctor
Check Homebrew installation health
Basic
brew cleanup
Clean up old versions of all packages
Basic
brew autoremove
Remove orphaned packages with no dependents
Intermediate
brew bundle dump
Generate a Brewfile for the current environment
Intermediate
brew bundle install
Install all dependencies from Brewfile
Intermediate
brew services start <formula>
Start a background service (e.g., nginx, mysql)
Intermediate
brew services list
List all registered services and their status
Intermediate

Taps(3)

CommandLevel
brew tap <user/repo>
Add a third-party repository
Basic
brew untap <user/repo>
Remove an added repository
Basic
brew tap
List all added tap repositories
Basic

Casks(2)

CommandLevel
brew install --cask <cask>
Install a GUI application (Cask)
Basic
brew upgrade --cask
Upgrade all outdated Cask applications
Intermediate

FAQ

This cheatsheet is compiled from official tool documentation. Last updated: 2026-07-17.