Guide · macOS · Developer Tools

Homebrew on macOS: The Complete 2026 Guide to Installing, Updating, and Cleaning Up

Nimesha Gunawardana· October 20, 2026· 9 min read
Homebrew on macOS — the standard package manager for installing, updating, and managing both command-line tools (formulae) and Mac apps (casks) from the Terminal.

Homebrew is the standard package manager for macOS — one tool, run from the Terminal, that installs, updates, and removes both developer tools and ordinary Mac apps.

It manages two kinds of software. Formulae are command-line tools and libraries — git, node, python, ffmpeg. Casks are regular Mac apps with a window and an icon — google-chrome, visual-studio-code, slack. Every tool installs the same way, updates come from one command, and you can rebuild a whole machine's setup on a new Mac in minutes.

Installing Homebrew

Install it with the one-line script from brew.sh, then add it to your PATH so the brew command works in every new Terminal window.

1. Paste the installer into Terminal (copy it fresh from brew.sh if in doubt):

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2. On Apple Silicon Macs (M1 and newer), Homebrew lives in /opt/homebrew. Add it to your shell so it loads automatically:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

3. Check that everything is working:

brew --version
brew doctor

On Intel Macs, Homebrew installs to /usr/local and is usually on your PATH already, but Intel support is winding down — see what's new in 2026 below. The installer prints the exact PATH lines for your machine at the end, so follow those if they differ. Prefer a regular installer? Apple Silicon Macs on macOS Sequoia 15 or later can use the official .pkg from Homebrew's GitHub releases page.

Everyday Commands

These ten commands cover almost everything you'll do day to day.

TaskCommandWhat it does
Searchbrew search <keyword>Finds formulae and casks matching a name.
Get detailsbrew info <name>Shows version, dependencies, install size, and any caveats.
Install a toolbrew install <formula>Installs a command-line tool, e.g. brew install git.
Install an appbrew install --cask <app>Installs a Mac app, e.g. brew install --cask visual-studio-code.
List installedbrew listShows everything you have installed (--cask for apps only).
See what's outdatedbrew outdatedLists packages with newer versions available.
Update everythingbrew update && brew upgradeRefreshes package data, then upgrades all packages.
Uninstallbrew uninstall <name>Removes the package (add --cask for apps).
Clean upbrew cleanupDeletes old versions and cached downloads.
Health checkbrew doctorFlags setup problems and tells you how to fix them.

Tip: brew install <name> also works for most apps without --cask. Use --cask when a tool and an app share the same name, or just to be explicit.

Keeping Everything Up to Date

One line updates Homebrew and every tool and app it manages:

brew update && brew upgrade

A safer routine, if you like to see changes before they happen:

  1. brew update to refresh package data.
  2. brew outdated to see what would change.
  3. brew upgrade for everything, or brew upgrade <name> for one package.
Apps that update themselves Chrome, Slack, Zoom, and similar apps are handled carefully so Homebrew never downgrades them. brew upgrade replaces one only when the installed app is older than Homebrew's latest version, and skips it when it can't tell. To upgrade all of them regardless, run brew upgrade --greedy.

Uninstalling Cleanly

brew uninstall removes the package itself, but not the dependencies it pulled in or an app's settings. Use these to clean up fully:

GoalCommand
Remove a toolbrew uninstall <formula>
Remove an appbrew uninstall --cask <app>
Remove an app plus its settings, caches, and support filesbrew uninstall --cask --zap <app>
Remove dependencies nothing uses anymorebrew autoremove

Use --zap with care: it deletes the app's preferences and data, so you start from scratch if you reinstall.

Freeing Disk Space

Homebrew keeps older versions and downloaded installers in case you need to roll back, and brew cleanup deletes them.

brew cleanup -n           # preview what would be deleted
brew cleanup              # remove old versions and stale downloads
brew cleanup --prune=all  # also clear every cached download

Homebrew already runs a cleanup automatically after installs and upgrades, and a fuller one every 30 days. Running it by hand is mainly useful when you need space right away. To see where the download cache lives, run brew --cache.

THE HOMEBREW WORKFLOW Install brew.sh script + shellenv Search & Install brew install Keep Updated update & upgrade Back Up the Setup Brewfile Clean Up Disk Space brew cleanup on repeat update → upgrade → cleanup, on a weekly habit
Homebrew in one loop: install it once, then search, install, update, back up, and clean up — the last three on repeat as a weekly habit.

Power-User Features

Three features make Homebrew far more useful once the basics feel natural.

Brewfile backups

Dump your whole setup to a plain-text file, check it into a dotfiles repo, and rebuild a new Mac with one command.

Background services

Run databases and servers like PostgreSQL or Redis in the background, with start-at-login built in.

Version pinning

Freeze a formula or cask at its current version so brew upgrade leaves it alone.

Back up your setup with a Brewfile

A Brewfile is a plain-text list of everything you have installed. Keep it in your dotfiles or a Git repo, and a new Mac is ready in one command.

brew bundle dump --file=~/Brewfile     # save your current setup
brew bundle --file=~/Brewfile          # install everything on a new Mac
brew bundle cleanup --file=~/Brewfile  # list anything not in the Brewfile

A Brewfile looks like this:

brew "git"
brew "node"
cask "visual-studio-code"
cask "google-chrome"

Run background services

Databases and servers such as postgresql or redis can run in the background and start at login:

brew services list              # see what is running
brew services start <name>      # start now and at every login
brew services stop <name>       # stop it

Hold a version in place

If a project depends on a specific version of a tool or app, pin it so brew upgrade leaves it alone:

brew pin <name>     # freeze the current version
brew unpin <name>   # allow upgrades again

Troubleshooting and Good Habits

When something goes wrong, run brew doctor first. It catches most problems and prints the fix.

ProblemFix
zsh: command not found: brewHomebrew is not on your PATH. Rerun the brew shellenv lines from the install section, then open a new Terminal window.
Permission errorsNever use sudo with brew. Run brew doctor and follow its advice on fixing folder ownership.
An install failed halfwayRun brew reinstall <name>.
A tool behaves oddly after an upgradeCheck brew info <name> for caveats, or pin the previous version next time.
Apps lose Dock position or permissions after an upgradeGive Terminal the App Management permission in System Settings → Privacy & Security, so Homebrew can upgrade apps in place.
Not sure if something depends on a packageRun brew uses --installed <name> before uninstalling it.

A few habits keep things smooth: run brew update && brew upgrade weekly rather than letting updates pile up, read the caveats printed after an install since they often contain setup steps you need, and keep your Brewfile in version control, refreshing it with brew bundle dump --force after big changes.

What's New in 2026

Homebrew 7.0.0, released September 13, 2026, is the current version, and brew update moves you to new versions automatically. The changes that matter for everyday use:

VersionReleasedWhat matters for everyday users
7.0.013 Sep 2026Faster installs and upgrades. Built-in brew vulns checks installed tools for known vulnerabilities. brew install --dry-run previews an install. An official Mac app (BrewUI) via brew install homebrew-app on macOS Tahoe 26+.
6.0.011 Jun 2026Third-party taps must be trusted before their code runs. Casks can now be pinned. New brew exec runs a formula's command, similar to npx.
5.1.010 Mar 2026brew version-install installs an older version of a formula in one step. Brewfiles can include Cargo, uv, and Flatpak packages.
5.0.012 Nov 2025Parallel downloads on by default. --no-quarantine deprecated, and apps failing macOS Gatekeeper checks are disabled from September 2026.

What to do about it:

Sources