Homebrew Cask

ID

cask

Home page

https://github.com/Homebrew/homebrew-cask

Version requirement

>= 6

Platforms

🍎 macOS

Operations

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

purl types

pkg:cask

Brewfile entry

cask, in Brewfile backups

CLI name

brew

Every call

brew <command> --cask

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 cask half of Homebrew: pre-built macOS applications.

Homebrew is the umbrella project behind the brew CLI. mpm splits it into two managers over the same binary, this one for casks and Brew for formulae; a forced --cask selector keeps every call on the cask side. Casks ship macOS .app bundles and .pkg installers, so this manager is macOS-only.

mpm drives brew non-interactively with the same environment pins as Brew (analytics and hints off, HOMEBREW_NO_AUTO_UPDATE so the metadata refresh stays a separate sync) and the same >=6.0.0 floor (ask mode default, the --yes opt-out, and the tap-trust gate that Homebrew.trust_tap() clears for user/tap/name packages).

Note

Casks self-escalate: their artifacts (.pkg installers, kernel extensions) invoke sudo from inside brew, so mpm never wraps a cask command in its own sudo.

Caution

Casks flagged auto_updates true or version :latest update themselves, and brew upgrade skips them unless --greedy is passed. mpm supplies --greedy (to outdated and to upgrade --all) unless auto-updating packages are being ignored. --greedy conflicts with --formula, so this handling is cask-only and cannot fold into the base shared with Brew.

What mpm adds to cask

mpm reaches across every manager at once, not cask alone: mpm installed and mpm outdated cover cask 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 cask commands, in mpm

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

To…

With cask

With mpm

List what’s installed

brew list --versions --formula

mpm --cask installed

List outdated packages

brew outdated --json=v2 --formula

mpm --cask outdated

Search for a package

brew search sed

mpm --cask search sed

Install a package

brew install jpeginfo --formula

mpm install pkg:cask/jpeginfo

Upgrade one package

brew upgrade dupeguru

mpm --cask upgrade dupeguru

Upgrade everything

brew upgrade --formula

mpm --cask upgrade --all

Remove a package

brew uninstall bat

mpm remove pkg:cask/bat

Clear caches

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

mpm --cask cleanup --cache

Run health checks

brew doctor

mpm --cask 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 cask

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

[mpm]
cask = false

The arguments and environment variables listed in the box atop this page are forced on every cask 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.cask]
timeout = 900

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

Recipes

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

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

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

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

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

Privilege escalation

Homebrew Cask runs sudo from inside its own commands: mpm never wraps it, keeps an already-warm credential cache alive for those internal escalations, and warns when a mutating call goes silent on a terminal with a cold cache, since a password prompt may be hiding in the stream.

See privilege escalation for the full policy.

Cooldown

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

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+)"

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.

  • 7.3.0 (2026-07-17)

    • upgrade --all now passes --greedy to brew upgrade when auto-updating packages are included, matching the outdated behavior. Auto-updating casks reported as outdated were never upgraded. Closes #1940.

  • 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.6.0 (2022-09-26)

    • Add support for remove operation in homebrew.

  • 5.5.0 (2022-07-08)

    • Fix parsing of multiple reported installed versions.

  • 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)

    • Bump minimal requirement of brew to 2.7.0.

    • Address deprecation of cask CLI subcommands.

  • 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)

    • Rely on JSON output to fetch outdated packages.

    • 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.8.0 (2019-01-03)

    • Remove cask-specific version, sync and search command. Closes #47.

  • 2.7.0 (2018-04-02)

    • Fix minimal version check for cask. Closes #41 and #44.

  • 2.6.0 (2017-09-10)

    • Use new brew cask outdated command.

    • Remove usage of deprecated brew cask update command.

    • Bump minimal requirement of cask to 1.1.12.

  • 2.5.0 (2017-03-01)

    • Add unittest to cover unicode names for Cask packages. Closes #16.

    • Add unittest to cover Cask packages with multiple names. Refs #26.

  • 2.3.0 (2017-01-15)

    • Fix parsing of cask packages with multiple names. Closes #26.

    • Fix cask update deprecation warning. Closes #28.

  • 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 parsing of multiple versions of cask installed packages.

    • 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.

    • Fix fetching of outdated cask packages.

    • Fix upgrade of cask packages.

  • 1.9.0 (2016-09-23)

    • Fix parsing of unversioned cask packages. Closes #6.

  • 1.7.0 (2016-08-16)

    • Workaround for Homebrew Cask full upgrade command.

  • 1.3.0 (2016-07-09)

    • Force Cask update before evaluating available packages.

  • 1.2.0 (2016-07-08)

    • Fixup brew cask checking.

  • 1.0.0 (2016-07-05)

    • Add support for Homebrew and Cask.