Commands
Manipulate Formulae & Casks
brew update
brew updateFetch the newest version of Homebrew and all formulae from GitHub using git(1) and perform any necessary migrations.
brew upgrade
brew upgradeUpgrade outdated casks and outdated&unpinned formulae using the same options they were originally installed with, plus any appended brew formula options.
If cask or formula are specified, upgrade only the given cask or formula kegs (unless they are pinned; see pin, unpin).
brew outdated
brew outdatedList installed casks and formulae that have an updated version available. By default, version information is displayed in interactive shells, and suppressed otherwise.
brew list/ls
brew list/lsList all installed formulae and casks.
brew search/-S <formula>: Use regular expression
brew search/-S <formula>: Use regular expressionIf <formula> is flanked by slashes, it is interpreted as a regular expression. e.g.:
brew install
brew installInstall a formula or cask. Additional options specific to a formula may be appended to the command.
brew uninstall/remove/rm
brew uninstall/remove/rmUninstall a formula or cask.
brew link
brew linkSymlink all of formula's installed files into Homebrew's prefix. This is done automatically when you install formulae but can be useful for DIY installations.
brew unlink
brew unlinkRemove symlinks for formula from Homebrew's prefix. This can be useful for temporarily disabling a formula:
brew unlink formula && <some commands> && brew link formula
e.g.
brew info
brew infoDisplay brief statistics for your Homebrew installation.
If a formula or cask is provided, show summary of information about it.
brew deps
brew depsShow dependencies for formula. Additional options specific to formula may be appended to the command. When given multiple formula arguments, show the intersection of dependencies for each formula.
Query Env Info
brew home
brew homeOpen a formula or cask's homepage in a browser, or open Homebrew's own homepage if no argument is provided.
brew --prefix
brew --prefixDisplay Homebrew's install path. Default:
macOS Intel:
/usr/localmacOS ARM:
/opt/homebrew
If formula is provided, display the location where formula is or would be installed.
brew --repository
brew --repositoryDisplay where Homebrew's git repository is located.
If user/repo are provided, display where tap user/repo's directory is located.
brew --cache
brew --cacheDisplay Homebrew's download cache. See also HOMEBREW_CACHE.
If formula is provided, display the file or directory used to cache formula.
brew --cellar
brew --cellarDisplay Homebrew's Cellar path. Default: $(brew --prefix)/Cellar, or if that directory doesn't exist, $(brew --repository)/Cellar.
If formula is provided, display the location in the Cellar where formula would be installed, without any sort of versioned directory as the last path.
brew --caskroom
brew --caskroomDisplay Homebrew's Caskroom path.
If cask is provided, display the location in the Caskroom where cask would be installed, without any sort of versioned directory as the last path.
brew --env
brew --envSummarize Homebrew's build environment as a plain list.
brew shellenv
brew shellenvPrint export statements. When run in a shell, this installation of Homebrew will be added to your PATH, MANPATH, and INFOPATH.
The variables HOMEBREW_PREFIX, HOMEBREW_CELLAR and HOMEBREW_REPOSITORY are also exported to avoid querying them multiple times. To help guarantee idempotence, this command produces no output when Homebrew's bin and sbin directories are first and second respectively in your PATH. Consider adding evaluation of this command's output to your dotfiles (e.g. ~/.profile, ~/.bash_profile, or ~/.zprofile) with: eval "$(brew shellenv)"
brew config
brew configShow Homebrew and system configuration info useful for debugging. If you file a bug report, you will be required to provide this information.
brew commands
brew commandsDisplay the path to the file being used when invoking brew <cmd>.
brew doctor
brew doctorCheck your system for potential problems. Will exit with a non-zero status if any potential problems are found. Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue.
If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this.
brew help <cmd>
brew help <cmd>Or use
brew <cmd> -h
Show help info for a command. e.g.:
GLOBAL OPTIONS
These options are applicable across multiple subcommands.
-d,--debug: Display any debugging information.-q,--quiet: Make some output more quiet.-v,--verbose: Make some output more verbose.-h,--help: Show this message.
Last updated