Remove all cache files older than specified *`days`*.
*`-n`, `--dry-run`:
Show what would be removed, but do not actually remove anything.
*`-s`:
Scrub the cache, including downloads for even the latest versions. Note downloads for any installed formula or cask will still not be deleted. If you want to delete those too: `rm -rf "$(brew --cache)"`
Display the path to the file which is used when invoking `brew`*`cmd`*.
### `commands` [*`options`*]
Show a list of built-in and external commands.
*`--include-aliases`:
Include the aliases of internal commands.
### `config`
Show Homebrew and system configuration useful for debugging. If you file
a bug report, you will likely be asked for this information if you do not
provide it.
### `deps` [*`options`*] *`formula`*
Show dependencies for *`formula`*. When given multiple formula arguments,
show the intersection of dependencies for *`formula`*.
*`--1`:
Only show dependencies one level down, instead of recursing.
*`-n`:
Show dependencies in topological order.
*`--union`:
Show the union of dependencies for *`formula`*, instead of the intersection.
*`--full-name`:
List dependencies by their full name.
*`--installed`:
Only list those dependencies that are currently installed.
*`--all`:
List all the dependencies for all available formulae.
*`--include-build`:
Show `:build` type dependencies for *`formula`*.
*`--include-optional`:
Show `:optional` dependencies for *`formula`*.
*`--include-test`:
Show `:test` dependencies for *`formula`* (non-recursive).
*`--skip-recommended`:
Skip `:recommended` type dependencies for *`formula`*.
*`--include-requirements`:
Include requirements in addition to dependencies for *`formula`*.
*`--tree`:
Show dependencies as a tree. When given multiple formula arguments output individual trees for every formula.
*`--for-each`:
Switch into the mode used by `deps --all`, but only list dependencies for specified formula one specified formula per line. This is used for debugging the `--installed`/`--all` display mode.
Fetch development version instead of stable version.
*`--retry`:
Retry if a download fails or re-download if the checksum of a previously cached version no longer matches.
*`--deps`:
Download dependencies for any listed *`formula`*.
*`-s`, `--build-from-source`:
Download the source for rather than a bottle.
*`--build-bottle`:
Download the source (for eventual bottling) rather than a bottle.
*`--force-bottle`:
Download a bottle if it exists for the current or newest version of macOS, even if it would not be used during installation.
### `gist-logs` [*`options`*] *`formula`*
Upload logs for a failed build of *`formula`* to a new Gist.
*`formula`* is usually the name of the formula to install, but it can be specified
in several different ways.
If no logs are found, an error message is presented.
*`--with-hostname`:
Include the hostname in the Gist.
*`-n`, `--new-issue`:
Automatically create a new issue in the appropriate GitHub repository as well as creating the Gist.
*`-p`, `--private`:
The Gist will be marked private and will not appear in listings but will be accessible with the link.
### `home` [*`formula`*]
Open *`formula`*'s homepage in a browser. If no formula is provided,
open Homebrew's own homepage in a browser.
### `info` [*`formula`*]
Display brief statistics for your Homebrew installation.
*`--analytics`:
Display Homebrew analytics data (provided neither `HOMEBREW_NO_ANALYTICS` or `HOMEBREW_NO_GITHUB_API` are set).
*`--days`:
The value for `days` must be `30`, `90` or `365`. The default is `30`.
*`--category`:
The value for `category` must be `install`, `install-on-request`, `build-error` or `os-version`. The default is `install`.
*`--github`:
Open a browser to the GitHub History page for provided *`formula`*. To view formula history locally: `brew log -p`*`formula`*
*`--json`:
Print a JSON representation of *`formula`*. 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>
*`--all`:
Get information on all formulae.
*`--installed`:
Get information on all installed formulae.
### `install` [*`options`*] *`formula`*
Install *`formula`*.
*`formula`* is usually the name of the formula to install, but it can be specified
If `std` is passed, use the standard build environment instead of superenv.If `super` is passed, use superenv even if the formula specifies the standard build environment.
*`--ignore-dependencies`:
Skip installing any dependencies of any kind. If they are not already present, the formula will probably fail to install.
*`--only-dependencies`:
Install the dependencies with specified options but do not install the specified formula.
*`--cc`:
Attempt to compile using provided *`compiler`*. *`compiler`* should be the name of the compiler's executable, for instance `gcc-7` for GCC 7. In order to use LLVM's clang, use `llvm_clang`. To specify the Apple-provided clang, use `clang`. This parameter 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 flag.
*`-s`, `--build-from-source`:
Compile the specified *`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`:
Install testing dependencies required to run `brew test`.
*`--devel`:
If *`formula`* defines it, install the development version.
*`--HEAD`:
If *`formula`* defines it, install the HEAD version, aka. master, trunk, unstable.
*`--fetch-HEAD`:
Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository's HEAD will be checked for updates when a new stable or development version has been released.
*`--keep-tmp`:
Don't delete the temporary files created during installation.
*`--build-bottle`:
Prepare the formula for eventual bottling during installation.
Print install times for each formula at the end of the run.
*`-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`:
Create a Git repository, useful for creating patches to the software.
Print formulae with fully-qualified names. If `--full-name` is not passed, other options (i.e. `-1`, `-l`, `-t` and `-r`) are passed to `ls` which produces the actual output.
*`--unbrewed`:
List all files in the Homebrew prefix not installed by Homebrew.
*`--versions`:
Show the version number for installed formulae, or only the specified formulae if *`formula`* are given.
*`--multiple`:
Only show formulae with multiple versions installed.
*`--pinned`:
Show the versions of pinned formulae, or only the specified (pinned) formulae if *`formula`* are given. See also `pin`, `unpin`.
*`-1`:
Force output to be one entry per line. This is the default when output is not to a terminal.
*`-l`:
List in long format. If the output is to a terminal, a total sum for all the file sizes is output on a line before the long listing.
*`-r`:
Reverse the order of the sort to get the oldest entries first.
*`-t`:
Sort by time modified (most recently modified first).
Print output in JSON format. 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>
Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository's HEAD will be checked for updates when a new stable or development version has been released.
Use a full clone when tapping a repository. By default, the repository is cloned as a shallow copy (`--depth=1`). To convert a shallow copy to a full copy, you can retap passing `--full` without first untapping.
*`--force-auto-update`:
Auto-update tap even if it is not hosted on GitHub. By default, only taps hosted on GitHub are auto-updated (for performance reasons).
*`--repair`:
Migrate tapped formulae from symlink-based to directory-based structure.
Print a JSON representation of *`taps`*. 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>
Fetches and resets Homebrew and all tap repositories (or any specified `repository`) using `git`(1) to their latest `origin/master`. Note this will destroy all your uncommitted or committed changes.
Compile *`formula`* from source even if a bottle is 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.
*`--fetch-HEAD`:
Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository's HEAD will be checked for updates when a new stable or development version has been released.
*`--ignore-pinned`:
Set a 0 exit code even if pinned formulae are not upgraded.
*`--keep-tmp`:
Don't delete the temporary files created during installation.
*`--display-times`:
Print install times for each formula at the end of the run.
### `uses` [*`options`*] *`formula`*
Show the formulae that specify *`formula`* as a dependency. When given
multiple formula arguments, show the intersection of formulae that use
*`formula`*.
By default, `uses` shows all formulae that specify *`formula`* as a required
or recommended dependency.
By default, `uses` shows usage of *`formula`* by stable builds.
*`--recursive`:
Resolve more than one level of dependencies.
*`--installed`:
Only list installed formulae.
*`--include-build`:
Include all formulae that specify *`formula`* as `:build` type dependency.
*`--include-test`:
Include all formulae that specify *`formula`* as `:test` type dependency.
*`--include-optional`:
Include all formulae that specify *`formula`* as `:optional` type dependency.
*`--skip-recommended`:
Skip all formulae that specify *`formula`* as `:recommended` type dependency.
Run additional style checks, including RuboCop style checks.
*`--online`:
Run additional slower style checks that require a network connection.
*`--new-formula`:
Run various additional style checks to determine if a new formula is eligible for Homebrew. This should be used when creating new formula and implies `--strict` and `--online`.
*`--fix`:
Fix style violations automatically using RuboCop's auto-correct feature.
*`--display-cop-names`:
Include the RuboCop cop name for each violation in the output.
*`--display-filename`:
Prefix every line of output with name of the file or formula being audited, to make output easy to grep.
*`-D`, `--audit-debug`:
Enable debugging and profiling of audit methods.
*`--only`:
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`:
Specify a comma-separated *`cops`* list to skip checking for violations of the listed RuboCop cops.
generated DSL. Passing `--keep-old` will attempt to keep it at its original
value, while `--no-rebuild` will remove it.
*`--skip-relocation`:
Do not check if the bottle can be marked as relocatable.
*`--or-later`:
Append `_or_later` to the bottle tag.
*`--force-core-tap`:
Build a bottle even if *`formula`* is not in homebrew/core or any installed taps.
*`--no-rebuild`:
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 argument 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 a JSON file generated with `brew bottle --json`*`formula`*.
*`--write`:
Write the 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.
*`--root-url`:
Use the specified *`URL`* as the root of the bottle's URL instead of Homebrew's default.
### `bump-formula-pr` [*`options`*] [*`formula`*]
Create a pull request to update a 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`* and *`formula`* name will
be made if either or both values are not supplied by the user.
If a *`tag`* is specified, the Git commit *`revision`* corresponding to that tag
must also be specified.
*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 preexisting
formula already uses.
*`--devel`:
Bump the development rather than stable version. The development spec must already exist.
*`-n`, `--dry-run`:
Print what would be done rather than doing it.
*`--write`:
When passed along with `--dry-run`, perform a not-so-dry run by making the expected file modifications but not taking any Git actions.
Print the pull request URL instead of opening in a browser.
*`--mirror`:
Use the provided *`URL`* as a mirror URL.
*`--version`:
Use the provided *`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`:
Append the provided *`message`* to the default PR message.
*`--url`:
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 *`SHA-256`* checksum of the new download.
*`--tag`:
Specify the new git commit *`tag`* for the formula.
*`--revision`:
Specify the new git commit *`revision`* corresponding to a specified *`tag`*.
Create a basic template for an Autotools-style build.
*`--cmake`:
Create a basic template for a CMake-style build.
*`--meson`:
Create a basic template for a Meson-style build.
*`--no-fetch`:
Homebrew will not download *`URL`* to the cache and will thus not add the 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`:
Set the name of the new formula to the provided *`name`*.
*`--set-version`:
Set the version of the new formula to the provided *`version`*.
*`--tap`:
Generate the new formula in the provided tap, specified as *`user`*`/`*`repo`*.
Return a failing status code if changes are detected in the manpage outputs. This can be used for CI to be notified when the manpages are out of date. Additionally, the date used in new manpages will match those in the existing manpages (to allow comparison without factoring in the date).
Homebrew's other current maintainers are Claudia Pellegrino, Chongyu Zhu, Vitor Galvao, Gautham Goli, Steven Peters, William Woodruff, Igor Kapkov, Izaak Beekman, Sean Molenaar, Jan Viljanen, Jason Tedor, Eric Knibbe, Viktor Szakats, Thierry Moisan, Steven Peters and Tom Schoonjans.
Former maintainers with significant contributions include 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 and Homebrew's creator: Max Howell.