Homebrew package manager for macOS. Search, install, manage, and troubleshoot packages and casks.
Complete Homebrew command reference and usage guide for installing, managing, and troubleshooting macOS packages.
brew install X)brew search X)brew search TEXT|/REGEX/Usage: Find packages by name or regex pattern When to use: When user asks to find or search for a package Examples:
brew search python
brew search /^node/
brew info [FORMULA|CASK...]Usage: Display detailed information about one or more packages When to use: Before installing to see dependencies, options, and details Examples:
brew info python
brew info chrome google-chrome
brew install FORMULA|CASK...Usage: Install one or more packages or applications When to use: When user says "install X" or "use brew to install X" Notes:
brew install git python nodejs
Examples:brew install python
brew install google-chrome # installs as cask
brew install git python nodejs
brew updateUsage: Fetch the newest version of Homebrew and all formulae When to use: When brew seems outdated or before major operations Notes: Doesn't upgrade packages, just updates the package list Examples:
brew update
brew upgrade [FORMULA|CASK...]Usage: Upgrade installed packages or specific packages When to use: When user wants to update to newer versions Notes:
brew upgrade # upgrade all outdated packages
brew upgrade python # upgrade just python
brew upgrade python git # upgrade multiple
brew uninstall FORMULA|CASK...Usage: Remove installed packages When to use: When user wants to remove/delete a package Notes: Can uninstall multiple at once Examples:
brew uninstall python
brew uninstall google-chrome
brew list [FORMULA|CASK...]Usage: List installed packages or files from specific packages When to use: When user wants to see what's installed or what files a package contains Examples:
brew list # show all installed packages
brew list python # show files installed by python
brew configUsage: Display Homebrew configuration and environment info When to use: Debugging installation issues or checking system setup Shows:
brew config
brew doctorUsage: Check for potential problems with Homebrew installation When to use: When experiencing installation issues or errors Returns: Warnings and suggestions for fixing issues Examples:
brew doctor
brew install --verbose --debug FORMULA|CASKUsage: Install with verbose output and debug information When to use: When standard install fails and you need detailed error messages Examples:
brew install --verbose --debug python
brew create URL [--no-fetch]Usage: Create a new formula from source code When to use: Creating custom packages (advanced users) Options:
--no-fetch = don't download source immediately
Examples:brew create https://example.com/package.tar.gz
brew edit [FORMULA|CASK...]Usage: Edit formula or cask definition When to use: Customizing package installation (advanced users) Examples:
brew edit python
brew commandsUsage: Show all available brew commands When to use: Learning about additional brew features Examples:
brew commands
brew help [COMMAND]Usage: Get help for specific command When to use: Need detailed help for a specific command Examples:
brew help install
brew help upgrade
| Task | Command |
|---|---|
| Search for package | brew search TEXT |
| Get package info | brew info FORMULA |
| Install package | brew install FORMULA |
| Install app | brew install CASK |
| Update package list | brew update |
| Upgrade all packages | brew upgrade |
| Upgrade specific package | brew upgrade FORMULA |
| Remove package | brew uninstall FORMULA |
| List installed | brew list |
| Check config | brew config |
| Troubleshoot | brew doctor |
brew search pythonbrew info [email protected]brew install [email protected]brew configbrew doctorbrew install --verbose --debug FORMULAbrew updatebrew upgrade (shows what would upgrade)brew upgradeFORMULA: Command-line tools and libraries (e.g., python, git, node)
CASK: GUI applications (e.g., google-chrome, vscode, slack)
TAP: Third-party formula repositories (e.g., brew tap homebrew/cask-versions)