Skip to content
Zearin edited this page Jun 17, 2011 · 61 revisions

Use man brew to view the manpage.

Command Description
brew --cache Print the path where Homebrew caches downloads (usually ~/Library/Caches/Homebrew)
brew --cellar Print the real path to your Homebrew Cellar (usually /usr/local/Cellar)
brew --config Print some useful system configuration
brew --env Print Homebrew’s environment
brew --prefix [formula] Print where formula is installed
brew --prefix Print the real path to your Homebrew prefix (usually /usr/local)
brew audit Audit all formulae for common code and style issues
brew cleanup [formula] Remove older versions from the Cellar for all (or specific) formulae1
brew create [url] Generate formula for downloadable file at url, then open it in $BREW_EDITOR or $EDITOR2
brew create tarball-url --cache Generate formula (including MD5), then download the tarball
brew create --fink formula Open Fink’s search page in your browser, so you can see how they do formula
brew create --macports [formula] Open MacPorts’ search page in your browser, so you can see how they do formula
brew doctor Check your Homebrew installation for common issues
brew edit formula Open formula in $HOMEBREW_EDITOR or $EDITOR
brew fetch --force -v --HEAD formula Download the source package for formula. For tarballs, also prints MD5 and SHA1 checksums.
brew home Open Homebrew’s homepage in your browser
brew home formula Opens formula ’s homepage in your browser
brew info Summarize all installed packages
brew info [formula] Print all available info formula (regardless of whether formula is installed)
brew info --github [formula] Open Github’s History page for formula in your browser
brew install [formula] Install formula
brew install --HEAD formula Install the HEAD version of formula (if its formula defines HEAD)
brew install --force --HEAD formula Install a newer HEAD version of formula (if its formula defines HEAD)
brew link formula Symlink all installed files for formula into the Homebrew prefix3
brew list [formula] List all installed files for formula (or all installed formulae with no arguments )
brew outdated List formulae that have an updated version available (brew install formula will install the newer version)
brew prune Remove dead symlinks from Homebrew’s prefix4
brew remove formula Uninstall formula
brew search List all available formula
brew search formula Search for formula in all available formula
brew search /formula/ Search for the regex /formula/ in all available formula
brew unlink formula Unsymlink formula from Homebrew’s prefix
brew update Update formulae and Homebrew itself
brew upgrade Install newer versions of outdated packages

You can update outdated packages like so:

brew install `brew outdated` (or brew outdated | xargs brew install (or brew upgrade))

1 To delete a specific version, just go to the folder in the Cellar and rm -rf it; alternatively, drag it to the trash in Finder.

2 Homebrew tries to guess the formula name and version. If it fails, you’ll have to make your own template. I suggest copying wget ’s.

3 Symlinking is automatically performed when installing formulae. It’s useful for DIY installation, or swapping out versions of a package you have multiple installs of.

4 This is generally not needed. However, it can be useful if you are doing DIY installations.

Clone this wiki locally