Brew (1) - The Missing Package Manager For macOS (Or Linux) - Homebrew Documentation
Brew (1) - The Missing Package Manager For macOS (Or Linux) - Homebrew Documentation
Homebrew Documentation
Search K
DESCRIPTION
Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn’t include with macOS. It
can also install software not packaged for your Linux distribution without requiring sudo.
TERMINOLOGY
formula
Homebrew package definition that builds from upstream sources
cask
Homebrew package definition that installs macOS native applications
prefix
path in which Homebrew is installed, e.g. /opt/homebrew or /home/linuxbrew/.linuxbrew
keg
installation destination directory of a given formula version, e.g. /opt/homebrew/Cellar/foo/0.1
rack
directory containing one or more versioned kegs, e.g. /opt/homebrew/Cellar/foo
keg-only
https://docs.brew.sh/Manpage 1/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
a formula is keg-only if it is not symlinked into Homebrew’s prefix
opt prefix
a symlink to the active version of a keg, e.g. /opt/homebrew/opt/foo
Cellar
directory containing one or more named racks, e.g. /opt/homebrew/Cellar
Caskroom
directory containing one or more named casks, e.g. /opt/homebrew/Caskroom
external command
brew subcommand defined outside of the Homebrew/brew GitHub repository
tap
directory (and usually Git repository) of formulae, casks and/or external commands
bottle
pre-built keg poured into a rack of the Cellar instead of building from upstream sources
ESSENTIAL COMMANDS
For the full command list, see the COMMANDS section.
With --verbose or --debug, many commands print extra debugging information. Note that these options should
only appear after a command.
Some command behaviour can be customised with environment variables; see the ENVIRONMENT section.
install formula
Install formula.
formula is usually the name of the formula to install, but it has other syntaxes which are listed in the
SPECIFYING FORMULAE section.
uninstall formula
Uninstall formula.
list
Perform a substring search of cask tokens and formula names for text. If text is flanked by slashes, it is
interpreted as a regular expression. The search for text is extended online to homebrew/core and
https://docs.brew.sh/Manpage 2/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
homebrew/cask. If no search term is provided, all locally available formulae are listed.
COMMANDS
alias [alias … | alias=command]
Show existing aliases. If no aliases are given, print the whole list.
--edit
Edit aliases in a text editor. Either one or all aliases may be opened at once. If the given alias doesn’t exist
it’ll be pre-populated with a template.
analytics [subcommand]
Uninstall formulae that were only installed as a dependency of another formula and are now no longer needed.
-n, --dry-run
Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask, Mac App Store, Whalebrew and Visual
Studio Code (and forks/variants).
brew bundle [install]
Install and upgrade (by default) all dependencies from the Brewfile.
You can specify the Brewfile location using --file or by setting the $HOMEBREW_BUNDLE_FILE environment
variable.
You can skip the installation of dependencies by adding space-separated values to one or more of the following
environment variables: $HOMEBREW_BUNDLE_BREW_SKIP, $HOMEBREW_BUNDLE_CASK_SKIP,
$HOMEBREW_BUNDLE_MAS_SKIP, $HOMEBREW_BUNDLE_WHALEBREW_SKIP, $HOMEBREW_BUNDLE_TAP_SKIP.
https://docs.brew.sh/Manpage 3/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
brew bundle dump
Write all installed casks/formulae/images/taps into a Brewfile in the current directory or to a custom file
specified with the --file option.
brew bundle cleanup
Add entries to your Brewfile. Adds formulae by default. Use --cask, --tap, --whalebrew or --vscode
to add the corresponding entry instead.
brew bundle remove name […]
Remove entries that match name from your Brewfile. Use --formula, --cask, --tap, --mas, --
whalebrew or --vscode to remove only entries of the corresponding type. Passing --formula also
removes matches against formula aliases and old formula names.
brew bundle exec [–check] command
Run an external command in an isolated build environment based on the Brewfile dependencies.
This sanitized build environment ignores unrequested dependencies, which makes sure that things you didn’t
specify in your Brewfile won’t get picked up by commands like bundle install, npm install, etc. It will
also add compiler flags which will help with finding keg-only dependencies like openssl, icu4c, etc.
brew bundle sh [–check]
Print the environment variables that would be set in a brew bundle exec environment.
--file
https://docs.brew.sh/Manpage 4/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Read from or write to the Brewfile from this location. Use --file=- to pipe to stdin/stdout.
--global
-v, --verbose
install prints output from commands as they are run. check lists all missing dependencies.
--no-upgrade
install does not run brew upgrade on outdated dependencies. check does not check for outdated
dependencies. Note they may still be upgraded by brew install if needed. This is enabled by default if
$HOMEBREW_BUNDLE_NO_UPGRADE is set.
--upgrade
--upgrade-formulae
--install
Temporarily start services while running the exec or sh command. This is enabled by default if
$HOMEBREW_BUNDLE_SERVICES is set.
-f, --force
install runs with --force/--overwrite. dump overwrites an existing Brewfile. cleanup actually
performs its cleanup operations.
--cleanup
install performs cleanup operation, same as running cleanup --force. This is enabled by default if
$HOMEBREW_BUNDLE_INSTALL_CLEANUP is set and --global is passed.
--all
--formula
--cask
--mas
--whalebrew
--vscode
--no-vscode
--describe
dump adds a description comment above each line, unless the dependency does not have a description. This
is enabled by default if $HOMEBREW_BUNDLE_DUMP_DESCRIBE is set.
--no-restart
--zap
--check
Check that all dependencies in the Brewfile are installed before running exec, sh, or env.
casks
Remove stale lock files and outdated downloads for all formulae and casks, and remove old versions of installed
formulae. If arguments are specified, only do this for the given formulae and casks. Removes all downloads
more than 120 days old. This can be adjusted with $HOMEBREW_CLEANUP_MAX_AGE_DAYS.
--prune
Remove all cache files older than specified days. If you want to remove everything, use --prune=all.
-n, --dry-run
Scrub the cache, including downloads for even the latest versions. Note that downloads for any installed
formulae or casks will still not be deleted. If you want to delete those too: rm -rf "$(brew --cache)"
--prune-prefix
Only prune the symlinks and directories from the prefix and remove no other files.
command command […]
Display the path to the file being used when invoking brew cmd.
commands [--quiet] [--include-aliases]
Control whether Homebrew automatically links external tap shell completion files. Read more at
https://docs.brew.sh/Shell-Completion.
brew completions [state]
Show Homebrew and system configuration info useful for debugging. If you file a bug report, you will be
required to provide this information.
deps [options] [formula|cask …]
Show dependencies for formula. When given multiple formula arguments, show the intersection of
dependencies for each formula. By default, deps shows all required and recommended dependencies.
If any version of each formula argument is installed and no other options are passed, this command displays their
actual runtime dependencies (similar to brew linkage), which may differ from the current versions’ stated
dependencies if the installed versions are outdated.
Note: --missing and --skip-recommended have precedence over --include-*.
https://docs.brew.sh/Manpage 7/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
-n, --topological
Show the union of dependencies for multiple formula, instead of the intersection.
--full-name
Show dependencies as a tree. When given multiple formula arguments, show individual trees for each
formula.
--graph
Mark any build, test, implicit, optional, or recommended dependencies as such in the output.
https://docs.brew.sh/Manpage 8/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
--installed
List dependencies for formulae that are currently installed. If formula is specified, list only its
dependencies that are currently installed.
--missing
Evaluate all available formulae and casks, whether installed or not, to list their dependencies.
--for-each
Switch into the mode used by the --eval-all option, but only list dependencies for each provided
formula, one formula per line. This is used for debugging the --installed/--eval-all display mode.
--HEAD
Display formula’s name and one-line description. The cache is created on the first search, making that search
slower than subsequent ones.
-s, --search
Search both names and descriptions for text. If text is flanked by slashes, it is interpreted as a regular
expression.
-n, --name
Search just names for text. If text is flanked by slashes, it is interpreted as a regular expression.
-d, --description
Search just descriptions for text. If text is flanked by slashes, it is interpreted as a regular expression.
https://docs.brew.sh/Manpage 9/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
--eval-all
Evaluate all available formulae and casks, whether installed or not, to search their descriptions. Implied if
$HOMEBREW_EVAL_ALL is set.
--formula
Control Homebrew’s developer mode. When developer mode is enabled, brew update will update Homebrew to
the latest commit on the master branch instead of the latest stable version along with some other behaviour
changes.
brew developer [state]
Check 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.
--list-checks
List all audit methods, which can be run individually if provided as arguments.
-D, --audit-debug
Download a bottle (if available) or source packages for formulae and binaries for casks. For files, also print
SHA-256 checksums.
--os
Download for the given operating system. (Pass all to download for all operating systems.)
https://docs.brew.sh/Manpage 10/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
--arch
Download for the given CPU architecture. (Pass all to download for all architectures.)
--bottle-tag
Do a verbose VCS checkout, if the URL represents a VCS. This is useful for seeing if an existing VCS
cache has been updated.
--retry
Retry if downloading fails or re-download if the checksum of a previously cached version no longer
matches. Tries at most 5 times with exponential backoff.
--deps
Download a bottle if it exists for the current or newest version of macOS, even if it would not be used
during installation.
--[no-]quarantine
https://docs.brew.sh/Manpage 11/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
List all locally installable formulae including short names.
gist-logs [options] formula
Upload logs for a failed build of formula to a new Gist. Presents an error message if no logs are found.
--with-hostname
Automatically create a new issue in the appropriate GitHub repository after creating the Gist.
-p, --private
The Gist will be marked private and will not appear in listings but will be accessible with its link.
help [command …]
Outputs the usage instructions for brew command. Equivalent to brew --help command.
Open a formula or cask’s homepage in a browser, or open Homebrew’s own homepage if no argument is
provided.
--formula
Display brief statistics for your Homebrew installation. If a formula or cask is provided, show summary of
information about it.
--analytics
List global Homebrew analytics data or, if specified, installation and build error data for formula
(provided neither $HOMEBREW_NO_ANALYTICS nor $HOMEBREW_NO_GITHUB_API are set).
--days
How many days of analytics data to retrieve. The value for days must be 30, 90 or 365. The default is 30.
--category
Which type of analytics data to retrieve. The value for category must be install, install-on-request
or build-error; cask-install or os-version may be specified if formula is not. The default is
install.
https://docs.brew.sh/Manpage 12/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
--github
Open the GitHub source page for formula and cask in a browser. To view the history locally: brew log -
p formula or cask
--fetch-manifest
Fetch GitHub Packages manifest for extra information when formula is not installed.
--json
Print a JSON representation. Currently the default value for version is v1 for formula. For formula and
cask use v2. See the docs for examples of using the JSON output: https://docs.brew.sh/Querying-Brew
--installed
Evaluate all available formulae and casks, whether installed or not, to print their JSON. Implied if
$HOMEBREW_EVAL_ALL is set.
--variations
Install a formula or cask. Additional options specific to a formula may be appended to the command.
Unless $HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is set, brew upgrade or brew reinstall will be run for
outdated dependents and dependents with broken linkage, respectively.
Unless $HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will then be run for the installed formulae or,
every 30 days, for all formulae.
Unless $HOMEBREW_NO_INSTALL_UPGRADE is set, brew install formula will upgrade formula if it is already
installed but outdated.
-d, --debug
If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary
build directory.
https://docs.brew.sh/Manpage 13/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
--display-times
Print install times for each package at the end of the run.
-f, --force
Install formulae without checking for previously installed keg-only or non-migrated versions. When
installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the
same cask).
-v, --verbose
An unsupported Homebrew development option to skip installing any dependencies of any kind. If the
dependencies are not already present, the formula will have issues. If you’re not developing Homebrew,
consider adjusting your PATH rather than using this option.
--only-dependencies
Install the dependencies with specified options but do not install the formula itself.
--cc
Attempt to compile using the specified compiler, which should be the name of the compiler’s executable,
e.g. gcc-9 for GCC 9. In order to use LLVM’s clang, specify llvm_clang. To use the Apple-provided
clang, specify clang. This option will only accept compilers that are provided by Homebrew or bundled
with macOS. Please do not file issues if you encounter errors while using this option.
-s, --build-from-source
Compile formula from source even if a bottle is provided. Dependencies will still be installed from bottles
if they are available.
--force-bottle
Install from a bottle if it exists for the current or newest version of macOS, even if it would not normally
be used for installation.
--include-test
--HEAD
If formula defines it, install the HEAD version, aka. main, trunk, unstable, master.
https://docs.brew.sh/Manpage 14/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
--fetch-HEAD
Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the
repository’s HEAD will only be checked for updates when a new stable or development version has been
released.
--keep-tmp
Prepare the formula for eventual bottling during installation, skipping any post-install steps.
--skip-post-install
Optimise bottles for the specified architecture rather than the oldest architecture supported by the version
of macOS the bottles are built on.
-i, --interactive
Download and patch formula, then open a shell. This allows the user to run ./configure --help and
otherwise determine how to turn the software package into a Homebrew package.
-g, --git
Ask for confirmation before downloading and installing formulae. Print bottles and dependencies
download size and install size.
--cask
Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined
with --force.
--skip-cask-deps
For use with brew reinstall --cask. Remove all files associated with a cask. May remove files which
are shared between applications.
leaves [--installed-on-request] [--installed-as-dependency]
List installed formulae that are not dependencies of another installed formula or cask.
-r, --installed-on-request
Symlink all of formula’s installed files into Homebrew’s prefix. This is done automatically when you install
formulae but can be useful for manual installations.
--overwrite
List files which would be linked or deleted by brew link --overwrite without actually linking or
deleting any files.
-f, --force
List all installed formulae and casks. If formula is provided, summarise the paths within its current keg. If cask
is provided, list its artifacts.
--formula
Print formulae with fully-qualified names. Unless --full-name, --versions or --pinned are passed,
other options (i.e. -1, -l, -r and -t) are passed to ls(1) which produces the actual output.
--versions
Show the version number for installed formulae, or only the specified formulae if formula are provided.
--multiple
List only pinned formulae, or only the specified (pinned) formulae if formula are provided. See also pin,
unpin.
--installed-on-request
Force output to be one entry per line. This is the default when output is not to a terminal.
-l
https://docs.brew.sh/Manpage 17/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
List formulae and/or casks in long format. Has no effect when a formula or cask name is passed as an
argument.
-r
Reverse the order of the formulae and/or casks sort to list the oldest entries first. Has no effect when a
formula or cask name is passed as an argument.
-t
Sort formulae and/or casks by time modified, listing most recently modified first. Has no effect when a
formula or cask name is passed as an argument.
log [options] [formula|cask]
Show the git log for formula or cask, or show the log for the Homebrew repository if no formula or cask is
provided.
-p, --patch
Migrate renamed packages to new names, where formula are old names of packages.
-f, --force
Treat installed formula and provided formula as if they are from the same taps and migrate them anyway.
-n, --dry-run
https://docs.brew.sh/Manpage 18/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Show what would be migrated, but do not actually migrate anything.
--formula
Check the given formula kegs for missing dependencies. If no formula are provided, check all kegs. Will exit
with a non-zero status if any kegs are found to be missing dependencies.
--hide
Act as if none of the specified hidden are installed. hidden should be a comma-separated list of formulae.
nodenv-sync
Evaluate all available formulae and casks, whether installed or not, to show their options.
--command
List installed casks and formulae that have an updated version available. By default, version information is
displayed in interactive shells and suppressed otherwise.
-q, --quiet
List only the names of outdated kegs (takes precedence over --verbose).
-v, --verbose
https://docs.brew.sh/Manpage 19/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Include detailed version information.
--formula
Print output in JSON format. There are two versions: v1 and v2. v1 is deprecated and is currently the
default if no version is specified. v2 prints outdated formulae and casks.
--fetch-HEAD
Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the
repository’s HEAD will only be checked for updates when a new stable or development version has been
released.
-g, --greedy
--greedy-latest
--greedy-auto-updates
Pin the specified formula, preventing them from being upgraded when issuing the brew upgrade formula
command. See also unpin.
Note: Other packages which depend on newer versions of a pinned formula might not install or run correctly.
postinstall, post_install installed_formula […]
Import all items from the specified tap, or from all installed taps if none is provided. This can be useful for
debugging issues across all items when making significant changes to formula.rb, testing the performance of
loading all items or checking if any current formulae/casks have Ruby issues.
--os
Read using the given operating system. (Pass all to simulate all operating systems.)
--arch
Read using the given CPU architecture. (Pass all to simulate all architectures.)
--aliases
Evaluate all available formulae and casks, whether installed or not. Implied if $HOMEBREW_EVAL_ALL is set.
--no-simulate
Don’t simulate other system configurations when checking formulae and casks.
reinstall [options] formula|cask […]
Uninstall and then reinstall a formula or cask using the same options it was originally installed with, plus any
appended options specific to a formula.
Unless $HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is set, brew upgrade or brew reinstall will be run for
outdated dependents and dependents with broken linkage, respectively.
Unless $HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will then be run for the reinstalled formulae or,
every 30 days, for all formulae.
-d, --debug
If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary
build directory.
--display-times
Print install times for each package at the end of the run.
-f, --force
Download and patch formula, then open a shell. This allows the user to run ./configure --help and
otherwise determine how to turn the software package into a Homebrew package.
--force-bottle
Install from a bottle if it exists for the current or newest version of macOS, even if it would not normally
be used for installation.
--keep-tmp
Ask for confirmation before downloading and upgrading formulae. Print bottles and dependencies
download size, install and net install size.
--cask
https://docs.brew.sh/Manpage 22/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Adopt existing artifacts in the destination that are identical to those being installed. Cannot be combined
with --force.
--skip-cask-deps
For use with brew reinstall --cask. Remove all files associated with a cask. May remove files which
are shared between applications.
search, -S [options] text|/regex/ […]
Perform a substring search of cask tokens and formula names for text. If text is flanked by slashes, it is
interpreted as a regular expression.
--formula
Search for formulae with a description matching text and casks with a name or description matching
text.
--eval-all
Evaluate all available formulae and casks, whether installed or not, to search their descriptions. Implied if
$HOMEBREW_EVAL_ALL is set.
--pull-request
https://docs.brew.sh/Manpage 23/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Search for text in the given database.
--opensuse
Manage background services with macOS’ launchctl(1) daemon manager or Linux’s systemctl(1) service
manager.
If sudo is passed, operate on /Library/LaunchDaemons or /usr/lib/systemd/system (started at boot).
Otherwise, operate on ~/Library/LaunchAgents or ~/.config/systemd/user (started at login).
[sudo] brew services [list] (--json) (--debug)
List information about all managed services for the current user (or root). Provides more output from
Homebrew and launchctl(1) or systemctl(1) if run with --debug.
[sudo] brew services info (formula|--all|--json)
List all managed services for the current user (or root).
[sudo] brew services run (formula|--all|--file=)
Run the service formula without registering to launch at login (or boot).
[sudo] brew services start (formula|--all|--file=)
Start the service formula immediately and register it to launch at login (or boot).
[sudo] brew services stop (--keep) (--no-wait|--max-wait=) (formula|--all)
Stop the service formula immediately and unregister it from launching at login (or boot), unless --keep is
specified.
[sudo] brew services kill (formula|--all)
Stop the service formula immediately but keep it registered to launch at login (or boot).
https://docs.brew.sh/Manpage 24/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
[sudo] brew services restart (formula|--all|--file=)
Stop (if necessary) and start the service formula immediately and register it to launch at login (or boot).
[sudo] brew services cleanup
Remove all unused services.
--file
Use the service file from this location to start the service.
--sudo-service-user
Wait at most this many seconds for stop to finish stopping a service. Omit this flag or set this to zero (0)
seconds to wait indefinitely.
--all
Output as JSON.
--no-wait
When stopped, don’t unregister the service from launching at login (or boot).
setup-ruby [command …]
Installs and configures Homebrew’s Ruby. If command is passed, it will only run Bundler if necessary for that
command.
shellenv [shell …]
https://docs.brew.sh/Manpage 25/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
The shell can be specified explicitly with a supported shell name parameter. Unknown shells will output POSIX
exports.
tab [options] installed_formula|installed_cask […]
Tap a formula repository. If no arguments are provided, list all installed taps.
With URL unspecified, tap a formula repository from GitHub using HTTPS. Since so many taps are hosted on
GitHub, this command is a shortcut for brew tap user/repo https://github.com/user/homebrew-repo.
With URL specified, tap a formula repository from anywhere, using any transport protocol that git(1) handles.
The one-argument form of tap simplifies but also limits. This two-argument command makes no assumptions,
so taps can be cloned from places other than GitHub and using protocols other than HTTPS, e.g. SSH, git,
HTTP, FTP(S), rsync.
--custom-remote
Add missing symlinks to tap manpages and shell completions. Correct git remote refs for any taps where
upstream HEAD branch has been renamed.
--eval-all
Evaluate all the formulae, casks and aliases in the new tap to check validity. Implied if
$HOMEBREW_EVAL_ALL is set.
-f, --force
Show detailed information about one or more taps. If no tap names are provided, display brief statistics for all
installed taps.
--installed
Print a JSON representation of tap. Currently the default and only accepted value for version is v1. See
the docs for examples of using the JSON output: https://docs.brew.sh/Querying-Brew
unalias alias […]
Remove aliases.
uninstall, remove, rm [options] installed_formula|installed_cask […]
Delete all installed versions of formula. Uninstall even if cask is not installed, overwrite existing files and
ignore errors when removing files.
--zap
Remove all files associated with a cask. May remove files which are shared between applications.
--ignore-dependencies
Remove symlinks for formula from Homebrew’s prefix. This can be useful for temporarily disabling a formula:
brew unlink formula && commands && brew link formula
-n, --dry-run
List files which would be unlinked without actually unlinking or deleting any files.
unpin installed_formula […]
https://docs.brew.sh/Manpage 27/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Unpin formula, allowing them to be upgraded by brew upgrade formula. See also pin.
Untap even if formulae or casks from this tap are currently installed.
update, up [options]
Fetch the newest version of Homebrew and all formulae from GitHub using git(1) and perform any necessary
migrations.
--merge
--auto-update
Run on auto-updates (e.g. before brew install). Skips some slower steps.
-f, --force
Runs brew update --auto-update only if needed. This is a good replacement for brew update in scripts
where you want the no-op case to be both possible and really fast.
update-reset [repository …]
Fetch and reset Homebrew and all tap repositories (or any specified repository) using git(1) to their latest
origin/HEAD.
Upgrade 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).
https://docs.brew.sh/Manpage 28/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Unless $HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is set, brew upgrade or brew reinstall will be run for
outdated dependents and dependents with broken linkage, respectively.
Unless $HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will then be run for the upgraded formulae or,
every 30 days, for all formulae.
-d, --debug
If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary
build directory.
--display-times
Print install times for each package at the end of the run.
-f, --force
Install formulae without checking for previously installed keg-only or non-migrated versions. When
installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the
same cask).
-v, --verbose
Treat all named arguments as formulae. If no named arguments are specified, upgrade only outdated
formulae.
-s, --build-from-source
Download and patch formula, then open a shell. This allows the user to run ./configure --help and
otherwise determine how to turn the software package into a Homebrew package.
--force-bottle
Install from a bottle if it exists for the current or newest version of macOS, even if it would not normally
be used for installation.
--fetch-HEAD
Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the
repository’s HEAD will only be checked for updates when a new stable or development version has been
released.
--keep-tmp
Ask for confirmation before downloading and upgrading formulae. Print bottles and dependencies
download size, install and net install size.
--cask
Treat all named arguments as casks. If no named arguments are specified, upgrade only outdated casks.
--skip-cask-deps
--greedy-latest
--greedy-auto-updates
--[no-]binaries
Show formulae and casks that specify formula as a dependency; that is, show dependents of formula. When
given multiple formula arguments, show the intersection of formulae that use formula. By default, uses shows
all formulae and casks that specify formula as a required or recommended dependency for their stable builds.
Note: --missing and --skip-recommended have precedence over --include-*.
--recursive
Only list formulae and casks that are not currently installed.
--eval-all
Evaluate all available formulae and casks, whether installed or not, to show their dependents.
--include-implicit
Include formulae that have formula as an implicit dependency for downloading and unpacking source
files.
--include-build
Show cache file for the given operating system. (Pass all to show cache files for all operating systems.)
--arch
Show cache file for the given CPU architecture. (Pass all to show cache files for all architectures.)
-s, --build-from-source
https://docs.brew.sh/Manpage 31/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Show the cache file used when building from source.
--force-bottle
Show the cache file used when pouring a bottle for the given tag.
--HEAD
Display 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.
--env, environment [--shell=] [--plain] [formula …]
--shell
Generate a list of environment variables for the specified shell, or --shell=auto to detect the current
shell.
--plain
https://docs.brew.sh/Manpage 32/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Display Homebrew’s install path. Default:
macOS ARM: /opt/homebrew
macOS Intel: /usr/local
Linux: /home/linuxbrew/.linuxbrew
If formula is provided, display the location where formula is or would be installed.
--unbrewed
Outputs nothing and returns a failing status code if formula is not installed.
--repository, --repo [tap …]
Print the version numbers of Homebrew, Homebrew/homebrew-core and Homebrew/homebrew-cask (if tapped)
to standard output.
DEVELOPER COMMANDS
audit [options] [formula|cask …]
Check formula or cask for Homebrew coding style violations. This should be run before submitting a new
formula or cask. If no formula or cask are provided, check all locally available formulae and casks and skip
style checks. Will exit with a non-zero status if any errors are found.
--os
Audit the given operating system. (Pass all to audit all operating systems.)
--arch
Audit the given CPU architecture. (Pass all to audit all architectures.)
--strict
Run additional, slower style checks that navigate the Git repository.
--online
Evaluate all available formulae and casks, whether installed or not, to audit them. Implied if
HOMEBREW_EVAL_ALL is set.
--new
Run various additional style checks to determine if a new formula or cask is eligible for Homebrew. This
should be used when creating new formulae or casks and implies --strict and --online.
--[no-]signing
Check formulae and casks within the given tap, specified as user/repo.
--fix
Prefix every line of output with the file or formula name being audited, to make output easy to grep.
--skip-style
Skip running non-RuboCop style checks. Useful if you plan on running brew style separately. Enabled
by default unless a formula is specified by name.
-D, --audit-debug
Specify a comma-separated method list to only run the methods named audit_method.
--except
Specify a comma-separated method list to skip running the methods named audit_method.
--only-cops
Specify a comma-separated cops list to check for violations of only the listed RuboCop cops.
--except-cops
https://docs.brew.sh/Manpage 34/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Specify a comma-separated cops list to skip checking for violations of the listed RuboCop cops.
--formula
Generate a bottle (binary package) from a formula that was installed with --build-bottle. If the formula
specifies a rebuild version, it will be incremented in the generated DSL. Passing --keep-old will attempt to
keep it at its original value, while --no-rebuild will remove it.
--skip-relocation
If the formula specifies a rebuild version, remove it from the generated DSL.
--keep-old
If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL.
--json
Write bottle information to a JSON file, which can be used as the value for --merge.
--merge
Generate an updated bottle block for a formula and optionally merge it into the formula file. Instead of a
formula name, requires the path to a JSON file generated with brew bottle --json formula.
--write
Write changes to the formula file. A new commit will be generated unless --no-commit is passed.
--no-commit
When passed with --write, a new commit will not generated after writing changes to the formula file.
--only-json-tab
When passed with --json, the tab will be written to the JSON file but not the bottle.
--no-all-checks
Use the specified URL as the root of the bottle’s URL instead of Homebrew’s default.
--root-url-using
Use the specified download strategy class for downloading the bottle’s URL instead of Homebrew’s
default.
bump [options] [formula|cask …]
Displays out-of-date packages and the latest version available. If the returned current and livecheck versions
differ or when querying specific packages, also displays whether a pull request has been opened with the URL.
--full-name
Check formulae and casks within the given tap, specified as user/repo.
--installed
https://docs.brew.sh/Manpage 36/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Don’t try to fork the repository.
--open-pr
Open a pull request for the new version if none have been opened yet.
--start-with
Letter or word that the list of package results should alphabetically follow.
--bump-synced
Make the expected file modifications without taking any Git actions.
--commit
When passed with --write-only, generate a new commit after writing changes to the cask file.
--no-audit
--no-style
--no-browse
Create a pull request to update formula with a new URL or a new tag.
If a URL is specified, the SHA-256 checksum of the new download should also be specified. A best effort to
determine the SHA-256 will be made if not supplied by the user.
If a tag is specified, the Git commit revision corresponding to that tag should also be specified. A best effort to
determine the revision will be made if the value is not supplied by the user.
If a version is specified, a best effort to determine the URL and SHA-256 or the tag and revision will be made if
both values are not supplied by the user.
Note: this command cannot be used to transition a formula from a URL-and-SHA-256 style specification into a
tag-and-revision style specification, nor vice versa. It must use whichever style specification the formula already
uses.
-n, --dry-run
Make the expected file modifications without taking any Git actions.
--commit
When passed with --write-only, generate a new commit after writing changes to the formula file.
--no-audit
--strict
--online
https://docs.brew.sh/Manpage 38/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Run brew audit --online before opening the PR.
--no-browse
Use the specified URL as a mirror URL. If URL is a comma-separated list of URLs, multiple mirrors will be
added.
--fork-org
Use the specified version to override the value parsed from the URL or tag. Note that --version=0 can
be used to delete an existing version override from a formula if it has become redundant.
--message
Specify the URL for the new download. If a URL is specified, the SHA-256 checksum of the new download
should also be specified.
--sha256
Specify the new commit revision corresponding to the specified git tag or specified version.
-f, --force
Use the specified package-name when finding Python resources for formula. If no package name is
specified, it will be inferred from the formula’s stable URL.
https://docs.brew.sh/Manpage 39/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
--python-extra-packages
Create a commit to increment the revision of formula. If no revision is present, “revision 1” will be added.
-n, --dry-run
Make the expected file modifications without taking any Git actions.
--message
Check all casks with unversioned URLs in a given tap for updates.
-n, --dry-run
Specify a comma-separated list of repositories to search. Supported repositories: brew, core, cask,
command-not-found and test-bot. Omitting this flag, or specifying --repositories=primary, searches
only the main repositories: brew,core,cask. Specifying --repositories=all, searches all repositories.
--from
Date (ISO-8601 format) to start searching contributions. Omitting this flag searches the last year.
--to
Specify a comma-separated list of GitHub usernames or email addresses to find contributions from.
Omitting this flag searches maintainers.
--csv
Generate a formula or, with --cask, a cask for the downloadable file at URL and open it in the editor. Homebrew
will attempt to automatically derive the formula name and version, but if it fails, you’ll have to make your own
template. The wget formula serves as a simple example. For the complete API, see:
https://rubydoc.brew.sh/Formula
--autotools
https://docs.brew.sh/Manpage 41/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Create a basic template for a Meson-style build.
--node
Homebrew will not download URL to the cache and will thus not add its SHA-256 to the formula for you,
nor will it check the GitHub API for GitHub projects (to fill out its description and homepage).
--HEAD
Indicate that URL points to the package’s repository rather than a file.
--set-name
Generate the new formula within the given tap, specified as user/repo.
-f, --force
Ignore errors for disallowed formula names and names that shadow aliases.
debugger [--open] command […]
https://docs.brew.sh/Manpage 42/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Run the specified Homebrew command in debug mode.
To pass flags to the command, use -- to separate them from the brew flags. For example: brew debugger --
list --formula.
-O, --open
macOS version (or comma-separated list of versions) the bottle should be built for.
--workflow
https://docs.brew.sh/Manpage 43/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Open a formula, cask or tap in the editor set by EDITOR or HOMEBREW_EDITOR, or open the Homebrew
repository for editing if no argument is provided.
--formula
Look through repository history to find the most recent version of formula and create a copy in tap.
Specifically, the command will create the new formula file at tap/Formula/[email protected]. If the tap is
not installed yet, attempt to install/clone the tap before continuing. To extract a formula from a tap that is not
homebrew/core use its fully-qualified form of user/repo/formula.
--git-revision
Search for the specified version of formula starting at revision instead of HEAD.
--version
Query from the specified days ago until the present. The default is 30 days.
--install
Output the number of specifically requested installations or installation as dependencies of the formula.
This is the default.
--cask-install
Output OS versions.
--homebrew-devcmdrun-developer
Output devcmdrun/HOMEBREW_DEVELOPER.
--homebrew-os-arch-ci
Output OS/Architecture/CI.
--homebrew-prefixes
--json
Output JSON. This is required: plain text support has been removed.
--all-core-formulae-json
Output a different JSON format containing the JSON data for all Homebrew/homebrew-core formulae.
--setup
Install the necessary gems, require them and exit without running a query.
generate-analytics-api
Generate homebrew/cask API data files for https://formulae.brew.sh. The generated files are written to the
current directory.
-n, --dry-run
Generate homebrew/core API data files for https://formulae.brew.sh. The generated files are written to the
current directory.
-n, --dry-run
Installs the specified comma-separated list of gem groups (default: last used). Replaces any previously
installed groups.
--add-groups
Installs the specified comma-separated list of gem groups, in addition to those already installed.
irb [--examples] [--pry]
Check the library links from the given formula kegs. If no formula are provided, check all kegs. Raises an error
if run on uninstalled formulae.
--test
https://docs.brew.sh/Manpage 46/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Show only missing libraries and exit with a non-zero status if any missing libraries are found.
--strict
Exit with a non-zero status if any undeclared dependencies with linkage are found.
--reverse
For every library that a keg references, print its dylib path followed by the binaries that link to it.
--cached
Print the cached linkage values stored in HOMEBREW_CACHE, set by a previous brew linkage run.
Check for newer versions of formulae and/or casks from upstream. If no formula or cask argument is passed, the
list of formulae and casks to check is taken from HOMEBREW_LIVECHECK_WATCHLIST or
~/.homebrew/livecheck_watchlist.txt.
--full-name
Check formulae and casks within the given tap, specified as user/repo.
--eval-all
Evaluate all available formulae and casks, whether installed or not, to check them.
--installed
Show the latest version only if it’s newer than the formula/cask.
--json
https://docs.brew.sh/Manpage 47/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
--cask
Include packages that are autobumped by BrewTestBot. By default these are skipped.
pr-automerge [options]
Find pull requests that can be automatically merged using brew pr-publish.
--tap
--with-label
Pull requests must not have these labels (default: do not merge, new formula, automerge-skip, pre-
release, CI-published-bottle-commits).
--without-approval
--autosquash
Instruct brew pr-publish to automatically reformat and reword commits in the pull request to the
preferred format.
--ignore-failures
Publish bottles for a pull request with GitHub Actions. Requires write access to the repository.
--autosquash
https://docs.brew.sh/Manpage 48/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
If supported on the target tap, automatically reformat and reword commits to our preferred format.
--large-runner
Download and publish bottles and apply the bottle commit from a pull request with artifacts generated by
GitHub Actions. Requires write access to the repository.
--no-upload
If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL.
--autosquash
Automatically reformat and reword commits in the pull request to our preferred format.
--branch-okay
https://docs.brew.sh/Manpage 49/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Do not warn if pulling to a branch besides the repository default (useful for testing).
--resolve
When a patch fails to apply, leave in progress and allow user to resolve, instead of aborting.
--warn-on-upload-failure
Warn instead of raising an error if the bottle upload fails. Useful for repairing bottle uploads that
previously failed.
--retain-bottle-dir
Does not clean up the tmp directory for the bottle so it can be used later.
--committer
Use the specified URL as the root of the bottle’s URL instead of Homebrew’s default.
--root-url-using
Use the specified download strategy class for downloading the bottle’s URL instead of Homebrew’s
default.
--workflows
Retrieve artifacts from the specified workflow (default: tests.yml). Can be a comma-separated list to
include multiple workflows.
--ignore-missing-artifacts
Comma-separated list of workflows which can be ignored if they have not been run.
pr-upload [options]
https://docs.brew.sh/Manpage 50/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL. When using
GitHub Packages, this also appends the manifest to the existing list.
-n, --dry-run
Warn instead of raising an error if the bottle upload fails. Useful for repairing bottle uploads that
previously failed.
--upload-only
--committer
Use the specified URL as the root of the bottle’s URL instead of Homebrew’s default.
--root-url-using
Use the specified download strategy class for downloading the bottle’s URL instead of Homebrew’s
default.
prof [--stackprof] [--vernier] command […]
Run Homebrew with a Ruby profiler. For example, brew prof readall.
--stackprof
Create a new draft Homebrew/brew release with the appropriate version number and release notes.
By default, brew release will bump the patch version number. Pass --major or --minor to bump the major or
minor version numbers, respectively. The command will fail if the previous major or minor release was made
less than one month ago.
Note: Requires write access to the Homebrew/brew repository.
--major
https://docs.brew.sh/Manpage 51/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Create a major release.
--minor
Run a Ruby instance with Homebrew’s libraries loaded. For example, brew ruby -e "puts :gcc.f.deps" or
brew ruby script.rb.
Enter an interactive shell for Homebrew’s build environment. Use years-battle-hardened build logic to help your
./configure && make && make install and even your gem install succeed. Especially handy if you run
Homebrew in an Xcode-only configuration since it adds tools like make to your PATH which build systems would
not find otherwise.
--env
https://docs.brew.sh/Manpage 52/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Check formulae or files for conformance to Homebrew style guidelines.
Lists of file, tap and formula may not be combined. If none are provided, style will run style checks on the
whole Homebrew library, including core code and all formulae.
--fix
Specify a comma-separated cops list to check for violations of only the listed RuboCop cops.
--except-cops
Specify a comma-separated cops list to skip checking for violations of the listed RuboCop cops.
tap-new [options] user/repo
Initialize Git repository and setup GitHub Actions workflows with the specified branch name (default:
main).
--github-packages
Run the test method provided by an installed formula. There is no standard output or return code, but generally it
should notify the user if something is wrong with the installed formula.
Example: brew install jruby && brew test jruby
https://docs.brew.sh/Manpage 53/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
-f, --force
Include tests that use the GitHub API and tests that use any of the taps for official external commands.
--debug
Only runs tests on files that were changed from the master branch.
--fail-fast
https://docs.brew.sh/Manpage 54/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
typecheck, tc [options] [tap …]
Ignores input files that contain the given string in their paths (relative to the input path passed to Sorbet).
unbottled [options] [formula …]
Use the specified bottle tag (e.g. big_sur) instead of the current OS.
--dependents
Print the homebrew/core commits where bottles were lost in the last week.
--eval-all
Evaluate all available formulae and casks, whether installed or not, to check them. Implied if
HOMEBREW_EVAL_ALL is set.
Unpack the source files for formula into subdirectories of the current working directory.
--destdir
Initialise a Git repository in the unpacked source. This is useful for creating patches for the software.
-f, --force
Record all discovered resources, even those that can’t be resolved successfully. This option is ignored for
homebrew/core formulae.
--ignore-non-pypi-packages
https://docs.brew.sh/Manpage 56/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Don’t fail if formula is not a PyPI package.
--install-dependencies
Use the specified version when finding resources for formula. If no version is specified, the current
version for formula will be used.
--package-name
Use the specified package-name when finding resources for formula. If no package name is specified, it
will be inferred from the formula’s stable URL.
--extra-packages
Run a test of brew update with a new repository clone. If no options are passed, use origin/master as the start
commit.
--to-tag
https://docs.brew.sh/Manpage 57/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Update the specified list of vendored gems to the latest version.
--no-commit
Verify the build provenance of bottles using GitHub’s attestation tools. This is done by first fetching the given
bottles and then verifying their provenance.
Note that this command depends on the GitHub CLI. Run brew install gh.
--os
Download for the given operating system.(Pass all to download for all operating systems.)
--arch
Download for the given CPU architecture.(Pass all to download for all architectures.)
--bottle-tag
--colorpickerdir
--internet-plugindir
--audio-unit-plugindir
--language
Comma-separated list of language codes to prefer for cask installation. The first matching language is
used, otherwise it reverts to the cask’s default language. The default value is the language of your system.
GLOBAL OPTIONS
These options are applicable across multiple subcommands.
-d, --debug
Print instructions for setting up the command-not-found hook for your shell. If the output is not to a tty, print the
appropriate handler script for your shell.
test-bot [options] [formula]
Tests the full lifecycle of a Homebrew change to a tap (Git repository). For example, for a GitHub Actions pull
request that changes a formula brew test-bot will ensure the system is cleaned and set up to test the formula,
install the formula, run various tests and checks on it, bottle (package) the binaries and test formulae that depend
on it to ensure they aren’t broken by these changes.
Only supports GitHub Actions as a CI provider. This is because Homebrew uses GitHub Actions and it’s freely
available for public and private use with macOS and Linux workers.
--dry-run
Clean all state from the Homebrew directory. Use with care!
--skip-setup
https://docs.brew.sh/Manpage 60/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Run brew bottle --keep-old to build new bottles for a single platform.
--skip-relocation
Run brew bottle --skip-relocation to build new bottles that don’t require relocation.
--only-json-tab
Run brew bottle --only-json-tab to build new bottles that do not contain a tab.
--local
Ask Homebrew to write verbose logs under ./logs/ and set $HOME to ./home/
--tap
Use the Git repository of the given tap. Defaults to the core tap for syntax checking.
--fail-fast
Print test step output in real time. Has the side effect of passing output as raw bytes instead of re-encoding
in UTF-8.
--test-default-formula
Use a default testing formula when not building a tap and no other formulae are specified.
--root-url
Use the specified URL as the root of the bottle’s URL instead of Homebrew’s default.
--git-name
--skip-new
--skip-new-strict
https://docs.brew.sh/Manpage 61/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Don’t pass --strict to brew audit for new formulae.
--skip-dependents
https://docs.brew.sh/Manpage 62/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Only run the bottles fetch steps. This optional post-upload test checks that all the bottles were uploaded
correctly. It is not run unless requested and only needs to be run on a single machine. The bottle commit to
be tested must be on the tested branch.
--only-cleanup-after
Use these testing formulae rather than running the formulae detection steps.
--added-formulae
Use these added formulae rather than running the formulae detection steps.
--deleted-formulae
Use these deleted formulae rather than running the formulae detection steps.
--skipped-or-failed-formulae
Use these skipped or failed formulae from formulae steps for a formulae dependents step.
--tested-formulae
Use these tested formulae from formulae steps for a formulae dependents step.
which-formula [--explain] command […]
Output explanation of how to get command by installing one of the providing formulae.
which-update [options] [database]
--stats
Print statistics about the database contents (number of commands and formulae, list of missing formulae).
--commit
Install and update formulae that are missing from the database and don’t have bottles.
https://docs.brew.sh/Manpage 63/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
--eval-all
Evaluate all installed taps, rather than just the core tap.
--max-downloads
An arbitrary file: Homebrew can install formulae from a local path. It can point to either a formula file or a
bottle. Prefix relative paths with ./ to prevent them from being interpreted as a formula or tap name.
SPECIFYING CASKS
Many Homebrew Cask commands accept one or more cask arguments. These can be specified the same way as
the formula arguments described in SPECIFYING FORMULAE above.
ENVIRONMENT
Note that environment variables must have a value set to be detected. For example, run export
HOMEBREW_NO_INSECURE_REDIRECT=1 rather than just export HOMEBREW_NO_INSECURE_REDIRECT.
/etc/homebrew/brew.env (system-wide)
${HOMEBREW_PREFIX}/etc/homebrew/brew.env (prefix-specific)
A space-separated list of taps. Homebrew will refuse to install a formula unless it and all of its
dependencies are in an official tap or in a tap on this list.
HOMEBREW_API_AUTO_UPDATE_SECS
Check Homebrew’s API for new formulae or cask data every $HOMEBREW_API_AUTO_UPDATE_SECS
seconds. Alternatively, disable API auto-update checks entirely with $HOMEBREW_NO_AUTO_UPDATE.
Default: 450.
HOMEBREW_API_DOMAIN
Use this URL as the download mirror for Homebrew JSON API. If metadata files at that URL are
temporarily unavailable, the default API domain will be used as a fallback mirror.
Default: https://formulae.brew.sh/api.
HOMEBREW_ARCH
Linux only: Pass this value to a type name representing the compiler’s -march option.
Default: native.
HOMEBREW_ARTIFACT_DOMAIN
Prefix all download URLs, including those for bottles, with this value. For example, export
HOMEBREW_ARTIFACT_DOMAIN=http://localhost:8080 will cause a formula with the URL
https://example.com/foo.tar.gz to instead download from
http://localhost:8080/https://example.com/foo.tar.gz. Bottle URLs however, have their domain
replaced with this prefix. This results in e.g.
https://ghcr.io/v2/homebrew/core/gettext/manifests/0.21 to instead be downloaded from
http://localhost:8080/v2/homebrew/core/gettext/manifests/0.21
HOMEBREW_ARTIFACT_DOMAIN_NO_FALLBACK
If set, pass --askto all formulae brew install, brew upgrade and brew reinstall commands.
HOMEBREW_AUTO_UPDATE_SECS
Run brew update once every $HOMEBREW_AUTO_UPDATE_SECS seconds before some commands, e.g. brew
install, brew upgrade and brew tap. Alternatively, disable auto-update entirely with
$HOMEBREW_NO_AUTO_UPDATE.
Default: 86400 (24 hours), 3600 (1 hour) if a developer command has been run or 300 (5 minutes) if
$HOMEBREW_NO_INSTALL_FROM_API is set.
HOMEBREW_BAT
https://docs.brew.sh/Manpage 65/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
If set, use bat for the brew cat command.
HOMEBREW_BAT_CONFIG_PATH
Use this URL as the download mirror for bottles. If bottles at that URL are temporarily unavailable, the
default bottle domain will be used as a fallback mirror. For example, export
HOMEBREW_BOTTLE_DOMAIN=http://localhost:8080 will cause all bottles to download from the prefix
http://localhost:8080/. If bottles are not available at $HOMEBREW_BOTTLE_DOMAIN they will be
downloaded from the default bottle domain.
Default: https://ghcr.io/v2/homebrew/core.
HOMEBREW_BREW_GIT_REMOTE
HOMEBREW_CASK_OPTS
Append these options to all cask commands. All --*dir options, --language, --require-sha, --no-
quarantine and --no-binaries are supported. For example, you might add something like the following
to your ~/.profile, ~/.bash_profile, or ~/.zshenv:
https://docs.brew.sh/Manpage 66/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
export HOMEBREW_CASK_OPTS="--appdir=${HOME}/Applications --fontdir=/Library/Fonts"
HOMEBREW_CLEANUP_MAX_AGE_DAYS
If set, brew install, brew upgrade and brew reinstall will cleanup all formulae when this number of
days has passed.
Default: 30.
HOMEBREW_COLOR
If set to an absolute path (i.e. beginning with /), pass it with --config when invoking curl(1). If set but
not a valid path, do not pass --disable, which disables the use of .curlrc.
HOMEBREW_CURL_PATH
Linux only: Set this value to a new enough curl executable for Homebrew to use.
Default: curl.
HOMEBREW_CURL_RETRIES
If set, tweak behaviour to be more relevant for Homebrew developers (active or budding) by e.g. turning
warnings into errors.
HOMEBREW_DISABLE_DEBREW
If set, the interactive formula debugger available via --debug will be disabled.
https://docs.brew.sh/Manpage 67/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
HOMEBREW_DISABLE_LOAD_FORMULA
If set, refuse to load formulae. This is useful when formulae are not trusted (such as in pull requests).
HOMEBREW_DISPLAY
Use this X11 display when opening a page in a browser, for example with brew home. Primarily useful on
Linux.
Default: $DISPLAY.
HOMEBREW_DISPLAY_INSTALL_TIMES
If set, print install times for each formula at the end of the run.
HOMEBREW_DOCKER_REGISTRY_BASIC_AUTH_TOKEN
Use this base64 encoded username and password for authenticating with a Docker registry proxying
GitHub Packages. If $HOMEBREW_DOCKER_REGISTRY_TOKEN is set, it will be used instead.
HOMEBREW_DOCKER_REGISTRY_TOKEN
Use this bearer token for authenticating with a Docker registry proxying GitHub Packages. Preferred over
$HOMEBREW_DOCKER_REGISTRY_BASIC_AUTH_TOKEN.
HOMEBREW_EDITOR
Use this editor when editing a single formula, or several formulae in the same directory.
Note: brew edit will open all of Homebrew as discontinuous files and directories. Visual Studio Code
can handle this correctly in project mode, but many editors will do strange things in this case.
Default: $EDITOR or $VISUAL.
HOMEBREW_ENV_SYNC_STRICT
If set, brew *env-sync will only sync the exact installed versions of formulae.
HOMEBREW_EVAL_ALL
If set, brew commands evaluate all formulae and casks, executing their arbitrary code, by default without
requiring --eval-all. Required to cache formula and cask descriptions.
HOMEBREW_FAIL_LOG_LINES
A space-separated list of casks. Homebrew will refuse to install a cask if it or any of its dependencies is on
this list.
HOMEBREW_FORBIDDEN_FORMULAE
https://docs.brew.sh/Manpage 68/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
A space-separated list of formulae. Homebrew will refuse to install a formula or cask if it or any of its
dependencies is on this list.
HOMEBREW_FORBIDDEN_LICENSES
A space-separated list of SPDX license identifiers. Homebrew will refuse to install a formula if it or any of
its dependencies has a license on this list.
HOMEBREW_FORBIDDEN_OWNER
A space-separated list of taps. Homebrew will refuse to install a formula if it or any of its dependencies is
in a tap on this list.
HOMEBREW_FORBID_CASKS
If set, Homebrew will refuse to read formulae or casks provided from file paths, e.g. brew install
./package.rb.
HOMEBREW_FORCE_API_AUTO_UPDATE
If set, update the Homebrew API formula or cask data even if $HOMEBREW_NO_AUTO_UPDATE is set.
HOMEBREW_FORCE_BREWED_CA_CERTIFICATES
If set, always use a Homebrew-installed ca-certificates rather than the system version. Automatically
set if the system version is too old.
HOMEBREW_FORCE_BREWED_CURL
If set, always use a Homebrew-installed curl(1) rather than the system version. Automatically set if the
system version of curl is too old.
HOMEBREW_FORCE_BREWED_GIT
If set, always use a Homebrew-installed git(1) rather than the system version. Automatically set if the
system version of git is too old.
HOMEBREW_FORCE_BREW_WRAPPER
If set, controls network access to the sandbox for formulae builds. Overrides any controls set through DSL
usage inside formulae. Must be allow or deny. If no value is set through this environment variable or DSL
usage, the default behavior is allow.
HOMEBREW_FORMULA_POSTINSTALL_NETWORK
If set, controls network access to the sandbox for formulae postinstall. Overrides any controls set through
DSL usage inside formulae. Must be allow or deny. If no value is set through this environment variable or
DSL usage, the default behavior is allow.
HOMEBREW_FORMULA_TEST_NETWORK
If set, controls network access to the sandbox for formulae test. Overrides any controls set through DSL
usage inside formulae. Must be allow or deny. If no value is set through this environment variable or DSL
usage, the default behavior is allow.
HOMEBREW_GITHUB_API_TOKEN
Use this personal access token for the GitHub API, for features such as brew search. You can create one
at https://github.com/settings/tokens. If set, GitHub will allow you a greater number of API requests. For
more information, see: https://docs.github.com/en/rest/overview/rate-limits-for-the-rest-api
Note: Homebrew doesn’t require permissions for any of the scopes, but some developer commands may
require additional permissions.
HOMEBREW_GITHUB_PACKAGES_TOKEN
Use this GitHub personal access token when accessing the GitHub Packages Registry (where bottles may
be stored).
HOMEBREW_GITHUB_PACKAGES_USER
Use this username when accessing the GitHub Packages Registry (where bottles may be stored).
HOMEBREW_GIT_COMMITTER_EMAIL
Set the Git author name and, if $HOMEBREW_GIT_COMMITTER_EMAIL is unset, committer email to this value.
HOMEBREW_GIT_NAME
Set the Git author name and, if $HOMEBREW_GIT_COMMITTER_NAME is unset, committer name to this value.
HOMEBREW_GIT_PATH
https://docs.brew.sh/Manpage 70/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Linux only: Set this value to a new enough git executable for Homebrew to use.
Default: git.
HOMEBREW_INSTALL_BADGE
Print this text before the installation summary of each successful build.
Default: The “Beer Mug” emoji.
HOMEBREW_LIVECHECK_AUTOBUMP
If set, brew livecheck will include data for packages that are autobumped by BrewTestBot.
HOMEBREW_LIVECHECK_WATCHLIST
Consult this file for the list of formulae to check by default when no formula argument is passed to brew
livecheck.
HOMEBREW_LOCK_CONTEXT
If set, Homebrew will add this output as additional context for locking errors. This is useful when running
brew in the background.
HOMEBREW_LOGS
HOMEBREW_MAKE_JOBS
Use this value as the number of parallel jobs to run when building with make(1).
Default: The number of available CPU cores.
HOMEBREW_NO_ANALYTICS
If set, do not send analytics. Google Analytics were destroyed. For more information, see:
https://docs.brew.sh/Analytics
HOMEBREW_NO_AUTOREMOVE
If set, calls to brew cleanup and brew uninstall will not automatically remove unused formula
dependents.
HOMEBREW_NO_AUTO_UPDATE
If set, do not automatically update before running some commands, e.g. brew install, brew upgrade
and brew tap. Preferably, run this less often by setting $HOMEBREW_AUTO_UPDATE_SECS to a value higher
than the default. Note that setting this and e.g. tapping new taps may result in a broken configuration.
Please ensure you always run brew update before reporting any issues.
https://docs.brew.sh/Manpage 71/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
HOMEBREW_NO_BOOTSNAP
If set, do not print any hints about changing Homebrew’s behaviour with environment variables.
HOMEBREW_NO_FORCE_BREW_WRAPPER
If set, do not use the GitHub API, e.g. for searches or fetching relevant issues after a failed install.
HOMEBREW_NO_INSECURE_REDIRECT
If set, do not check for broken linkage of dependents or outdated dependents after installing, upgrading or
reinstalling formulae. This will result in fewer dependents (and their dependencies) being upgraded or
reinstalled but may result in more breakage from running brew install formula or brew upgrade
formula.
HOMEBREW_NO_INSTALL_CLEANUP
If set, brew install, brew upgrade and brew reinstall will never automatically cleanup
installed/upgraded/reinstalled formulae or all formulae every $HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS
days. Alternatively, $HOMEBREW_NO_CLEANUP_FORMULAE allows specifying specific formulae to not clean
up.
HOMEBREW_NO_INSTALL_FROM_API
If set, do not install formulae and casks in homebrew/core and homebrew/cask taps using Homebrew’s
API and instead use (large, slow) local checkouts of these repositories.
https://docs.brew.sh/Manpage 72/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
HOMEBREW_NO_INSTALL_UPGRADE
If set, brew install formula|cask will not upgrade formula|cask if it is installed but outdated.
HOMEBREW_NO_UPDATE_REPORT_NEW
If set, brew update will not show the list of newly added formulae/casks.
HOMEBREW_NO_VERIFY_ATTESTATIONS
If set, Homebrew will not verify cryptographic attestations of build provenance for bottles from
homebrew-core.
HOMEBREW_PIP_INDEX_URL
If set, brew install formula will use this URL to download PyPI package resources.
Default: https://pypi.org/simple.
HOMEBREW_PRY
HOMEBREW_SIMULATE_MACOS_ON_LINUX
If set, running Homebrew on Linux will simulate certain macOS code paths. This is useful when auditing
macOS formulae while on Linux.
HOMEBREW_SKIP_OR_LATER_BOTTLES
If set along with $HOMEBREW_DEVELOPER, do not use bottles from older versions of macOS. This is useful
in development on new macOS versions.
HOMEBREW_SORBET_RUNTIME
If set, enable runtime typechecking using Sorbet. Set by default for $HOMEBREW_DEVELOPER or when
running some developer commands.
HOMEBREW_SSH_CONFIG_PATH
If set, Homebrew will use the given config file instead of ~/.ssh/config when fetching Git repositories
over SSH.
Default: ~/.ssh/config
HOMEBREW_SUDO_THROUGH_SUDO_USER
If set, Homebrew will use the SUDO_USER environment variable to define the user to sudo(8) through when
running sudo(8).
HOMEBREW_SVN
Use this path as the temporary directory for building packages. Changing this may be needed if your
system temporary directory and Homebrew prefix are on different volumes, as macOS has trouble moving
symlinks across volumes when the target does not yet exist. This issue typically occurs when using
FileVault or custom SSD configurations.
Default: macOS: /private/tmp, Linux: /var/tmp.
HOMEBREW_UPDATE_TO_TAG
If set, always use the latest stable tag (even if developer commands have been run).
HOMEBREW_UPGRADE_GREEDY
A space-separated list of casks. Homebrew will act as if --greedy was passed when upgrading any cask
on this list.
HOMEBREW_VERBOSE
If set, verbose output will print a . no more than once a minute. This can be useful to avoid long-running
Homebrew commands being killed due to no output.
HOMEBREW_VERIFY_ATTESTATIONS
If set, Homebrew will use the gh tool to verify cryptographic attestations of build provenance for bottles
from homebrew-core.
SUDO_ASKPASS
Use this SOCKS5 proxy for curl(1), git(1) and svn(1) when downloading through Homebrew.
ftp_proxy
Use this FTP proxy for curl(1), git(1) and svn(1) when downloading through Homebrew.
http_proxy
Use this HTTP proxy for curl(1), git(1) and svn(1) when downloading through Homebrew.
https_proxy
https://docs.brew.sh/Manpage 74/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
Use this HTTPS proxy for curl(1), git(1) and svn(1) when downloading through Homebrew.
no_proxy
A comma-separated list of hostnames and domain names excluded from proxying by curl(1), git(1) and
svn(1) when downloading through Homebrew.
SEE ALSO
Homebrew Documentation: https://docs.brew.sh
Homebrew API: https://rubydoc.brew.sh
git(1), git-log(1)
AUTHORS
Homebrew’s Project Leader is Mike McQuaid.
Homebrew’s Project Leadership Committee is Colin Dean, Michka Popoff, Mike McQuaid, Patrick Linnane and
Vanessa Gennarelli.
Homebrew’s Technical Steering Committee is Bo Anderson, FX Coudert, Mike McQuaid and Rylan Polster.
Homebrew’s maintainers are Alexander Bayandin, Bevan Kay, Bo Anderson, Branch Vincent, Caleb Xu, Carlo
Cabrera, Daeho Ro, Douglas Eichelberger, Dustin Rodrigues, Eric Knibbe, FX Coudert, Issy Long, Justin
Krehel, Klaus Hipp, Markus Reiter, Michael Cho, Michka Popoff, Mike McQuaid, Nanda H Krishna, Patrick
Linnane, Rui Chen, Ruoyu Zhong, Rylan Polster, Sam Ford, Sean Molenaar, Štefan Baebler, Thierry Moisan,
Timothy Sutton and William Woodruff.
Former maintainers with significant contributions include Miccal Matthews, Misty De Méo, Shaun Jackman,
Vítor Galvão, Claudia Pellegrino, Seeker, Jan Viljanen, JCount, commitay, Dominyk Tiller, Tim Smith, Baptiste
Fontaine, Xu Cheng, Martin Afanasjew, Brett Koonce, Charlie Sharpsteen, Jack Nagel, Adam Vandenberg,
Andrew Janke, Alex Dunn, neutric, Tomasz Pajor, Uladzislau Shablinski, Alyssa Ross, ilovezfs, Chongyu Zhu
and Homebrew’s creator: Max Howell.
BUGS
https://docs.brew.sh/Manpage 75/76
5/12/25, 11:41 AM brew(1) – The Missing Package Manager for macOS (or Linux) — Homebrew Documentation
See our issues on GitHub:
Homebrew/brew
https://github.com/Homebrew/brew/issues
Homebrew/homebrew-core
https://github.com/Homebrew/homebrew-core/issues
Homebrew/homebrew-cask
https://github.com/Homebrew/homebrew-cask/issues
https://docs.brew.sh/Manpage 76/76