Homebrew Formulae

ID

brew

Home page

https://brew.sh

Version requirement

>= 6

Platforms

🐧 Linux · 🍎 macOS

Operations

installed · outdated · orphans · search · install · upgrade · upgrade_all · remove · sync · cleanup · doctor

purl types

pkg:brew

Brewfile entry

brew, in Brewfile backups

CLI name

brew

Every call

brew <command> --formula

Forced environment

HOMEBREW_NO_ANALYTICS=1 · HOMEBREW_NO_AUTO_UPDATE=1 · HOMEBREW_NO_ENV_HINTS=1

Issues and PRs

📦 manager: homebrew

Source

meta_package_manager/managers/homebrew.py

The formula half of Homebrew: command-line tools built from recipes.

Homebrew is the umbrella project behind the brew CLI. mpm splits it into two managers over the same binary, this one for formulae and Cask for macOS applications; a forced --formula selector keeps every call on the formula side. Homebrew core runs on macOS and on Linux and WSL.

mpm drives brew non-interactively and pins its environment: analytics and setup hints are silenced, and HOMEBREW_NO_AUTO_UPDATE keeps brew from folding a metadata refresh into every command, since mpm runs that as a separate sync (asked for since mpm’s early days). Outdated packages come from --json=v2; the installed and search listings are parsed from their plain-text columns.

Note

The >=6.0.0 requirement is the release where ask mode became the default for brew install and brew upgrade, and where the --yes opt-out mpm relies on for unattended runs first shipped. It is also where Homebrew began rejecting third-party taps until trusted, so installing a fully-qualified user/tap/name package taps and trusts it first (see Homebrew.trust_tap()).

Caution

A pinned formula still appears in mpm outdated output, yet brew upgrade silently skips it: mpm discards Homebrew’s pinned fields today.

What mpm adds to brew

mpm reaches across every manager at once, not brew alone: mpm installed and mpm outdated cover brew alongside every other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.

Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.

Your brew commands, in mpm

You already know brew: each operation maps one-to-one onto mpm, in an interface shared by every manager.

To…

With brew

With mpm

List what’s installed

brew list --versions

mpm --brew installed

List outdated packages

brew outdated --json=v2

mpm --brew outdated

Search for a package

brew search sed

mpm --brew search sed

Install a package

brew install jpeginfo

mpm install pkg:brew/jpeginfo

Upgrade one package

brew upgrade dupeguru --cask

mpm --brew upgrade dupeguru

Upgrade everything

brew upgrade

mpm --brew upgrade --all

Remove a package

brew uninstall bat

mpm remove pkg:brew/bat

List orphaned dependencies

brew autoremove --dry-run --quiet

mpm --brew orphans

Clear caches

brew cleanup --quiet --scrub --prune=all

mpm --brew cleanup --cache

Run health checks

brew doctor

mpm --brew doctor

Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.

Operations

Operation

Supported

Notes

installed

outdated

orphans

search

install

upgrade

upgrade_all

remove

sync

cleanup

--orphans runs the system-wide orphan sweep

doctor

Selecting and configuring brew

Deselect brew for a single run with --no-brew, or persist the choice in your configuration:

[mpm]
brew = false

The arguments and environment variables listed in the box atop this page are forced on every brew call, so runs stay quiet, non-interactive and reproducible: the defaults you would set in CI anyway.

Keep it enabled but tune how mpm drives it with a per-manager override:

[mpm.managers.brew]
timeout = 900

mpm config-template brew prints every overridable attribute as a ready-to-paste block.

Recipes

A few jobs you would otherwise script around brew, one mpm command each:

  • Snapshot and clone a machine: mpm --brew dump brew.toml, then mpm restore brew.toml on the next one.

  • Export a Brewfile entry instead: mpm --brew dump --brewfile Brewfile.

  • Export a compliance SBOM: mpm --brew sbom (CycloneDX by default, --spdx for SPDX).

  • Gate CI on health: mpm --brew doctor relays Homebrew Formulae’s own diagnosis and exits non-zero on trouble.

Privilege escalation

mpm runs this manager as the current user and never prepends sudo by default. Flip the policy for its privileged operations with --sudo or the per-manager sudo override.

See privilege escalation for the full policy.

Cooldown

State of Homebrew Formulae’s release-age gating, from the cooldown support table:

  • Status: 🚧 Proposed (closed as not planned for users; merged for internal bottle resource resolution)

  • Mechanism: (internal) --min-release-age=1, --uploaded-prior-to

  • Reference: Homebrew/brew#21129

A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:

  • Registry: Homebrew taps

  • Retraction: Index revert through the tap’s git history, over a package-level lifecycle: deprecate! still installs with a warning, disable! makes the action fail, removal deletes it (lifecycle)

  • Publish date: ❌ a formula records the upstream version, not its publication date

With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --allow-unsupported-managers opts back in.

Version probe

The version is extracted from the output of brew --version with:

r"Homebrew\s+(?P<version>\S+)"

Reference traces

Raw native outputs captured in the manager source: the reference mpm’s parsers were written against. If you know Homebrew Formulae well and a transcript below looks wrong, or a newer release changed its output format, report it.

$ brew autoremove --dry-run --quiet
==> Would autoremove 3 unneeded formulae:
libpng
little-cms2
openjpeg

Feed any of these through mpm and the raw output becomes one uniform table, the same shape for every manager: filter it, project columns, or export it (mpm --brew installed --output json, or csv, toml, yaml), each package carrying a purl and a version comparable across managers.

Changelog

  • 7.4.0 (2026-07-25)

    • cleanup invokes the cache scrub with the long-form --scrub flag.

    • Plain cleanup no longer removes orphaned packages: their native sweeps moved behind cleanup --orphans. This also stops emerge’s cleanup from triggering its pre-depclean world upgrade unless --orphans is given.

  • 6.6.0 (2026-06-17)

    • Adapt to Homebrew 6.0.0: pass --yes to brew upgrade to suppress the new interactive prompt, and trust tap-qualified installs before installing to avoid tap trust is required aborts. Bumps minimum brew from 2.7.0 to 6.0.0.

  • 6.2.1 (2026-03-26)

    • Remove --quiet from outdated command where it conflicts with --json. Closes #1703.

  • 6.2.0 (2026-03-25)

    • Add --quiet option to all brew invocations to reduce log verbosity.

  • 5.11.0 (2023-01-30)

    • Activate brew on Windows Subsystem for Linux v2.

  • 5.6.0 (2022-09-26)

    • Add support for remove operation in homebrew.

  • 5.3.0 (2022-06-25)

    • Implement extended search on description.

  • 4.12.0 (2022-04-04)

    • Fix execution of sync command.

  • 4.11.0 (2022-04-03)

    • Do not let homebrew auto-update on other commands. Refs #36.

    • Disable analytics and env hints in logs.

  • 4.9.0 (2022-01-03)

    • Thorough cleanup: call autoremove commands to remove unused dependencies and use --prune=all to scrub the whole cache.

  • 3.6.0 (2021-01-03)

    • Add support for brew on Linux.

    • Bump minimal requirement of brew to 2.7.0.

  • 3.5.0 (2020-09-20)

    • Bump minimal requirement of brew to 2.5.0.

    • Fix warning to deprecated options.

  • 3.4.2 (2020-09-13)

    • Do not mix-up brew and cask upgrades.

  • 3.2.0 (2020-05-31)

    • Bump minimal requirement to 2.2.15.

  • 3.0.0 (2020-03-25)

    • Allow independent search for each manager.

    • Bump minimal requirement of to 2.2.9.

  • 2.9.0 (2020-03-18)

    • Fix call to brew upgrade --cleanup. Refs #50.

    • Fix parsing of brew version. Closes #49 and #51.

  • 2.8.0 (2019-01-03)

    • Vanilla brew and cask CLIs now shares the same version requirements.

    • Bump minimal requirement of brew and cask to 1.7.4.

  • 2.1.1 (2016-12-17)

    • Fix parsing of non-point releases of brew and cask versions. Closes #15.

  • 1.12.0 (2016-12-03)

    • Fix lexicographical sorting of brew and cask package versions.

  • 1.11.0 (2016-11-30)

    • Bump minimal requirement of brew to 1.0.0 and cask to 1.1.0.

  • 1.7.0 (2016-08-16)

    • Fix issues with $PATH not having Homebrew/Macports.

  • 1.0.0 (2016-07-05)

    • Add support for Homebrew and Cask.