Homebrew on Mac: Install, Everyday Commands, and What's New in 7.0

What Homebrew is: the package manager macOS forgot to include

Sooner or later, every developer who moves to a Mac runs into the same sentence: “just install it with Homebrew.” Homebrew is the free, open-source package manager most Mac developers rely on: one command installs, updates, or removes software, with no more hunting for download links, dragging .dmg files around, or sorting out dependencies by hand. As of December 2026, the latest release is 7.0.x. By the end of this guide you will have it installed, know the commands you will actually use every day, and understand what changed in the big 7.0 release.

Three terms first: a formula is a command-line tool (like git, node, or ffmpeg); a cask is a graphical app (like Chrome or VS Code); a tap is a third-party repository of packages. Everything else in this guide builds on those three words.

Before you install: three things to check

  1. Chip and macOS version. Homebrew officially supports Apple Silicon Macs (M-series chips) running macOS 15 Sequoia or newer. Intel Macs are now on Tier 3 support: no new prebuilt bottles, with support scheduled to end entirely on 1 September 2027.
  2. An admin account. The installer asks for your administrator password once, to create the /opt/homebrew directory. After that, installing software day to day does not need admin rights.
  3. A network connection. The installer downloads from GitHub. The whole process usually takes a few minutes.

Install Homebrew with one command

Paste the official install command into Terminal. Take it only from brew.sh — fake Homebrew sites have recently been pushed through Google ads to spread infostealing malware, so never copy the installer from an unfamiliar source:

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

The script lists what it is about to create and waits for you to press Return. If your Mac does not have the Xcode Command Line Tools yet, it installs those too. Verify the result afterwards:

brew --version
brew doctor

brew doctor checks your setup for problems. Run it once right after installing; it is a good habit.

The first thing after installing: add brew to your PATH

This is where most beginners get stuck: after installing, typing brew returns zsh: command not found: brew. The reason is simple — on Apple Silicon, Homebrew lives in /opt/homebrew, which is not on your shell’s search path by default. The installer prints two commands at the end; run them (for zsh, the default macOS shell):

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

The first line writes the setting into ~/.zprofile, so every new Terminal window picks it up; the second applies it to the window you are in right now. Open a fresh Terminal window and run brew --version — if you see a version number, you are set.

The commands you will use every day

Task Command
Search for a package brew search git
Install a command-line tool brew install git
Install a graphical app brew install --cask google-chrome
List everything installed brew list
Details about a package brew info git
Refresh the package catalogue brew update
Upgrade everything brew upgrade
Upgrade just one thing brew upgrade git
See what has a newer version brew outdated
Uninstall brew uninstall git
Delete old versions, free disk space brew cleanup

The pair that trips people up is update versus upgrade: brew update only refreshes Homebrew itself and its catalogue — it touches nothing you have installed. brew upgrade is what actually installs newer versions. Routine maintenance is just brew update && brew upgrade every few weeks.

Graphical apps too: formulae vs casks

brew install installs command-line tools; graphical apps need the --cask flag, for example brew install --cask visual-studio-code. Casks come from the developer’s own installer, and Homebrew verifies the file before installing it. Check availability first with brew search --cask.

If you rent a Mac from Tokyo Mac, there is an easier route for the common apps: you do not need to install Homebrew or have an admin password at all. Open “My Macs → Install apps”, tick the apps you want, and install them in one click. Every app in the library comes from official Homebrew sources and is verified against its SHA-256 checksum, and the install usually finishes in a few minutes.

Tokyo Mac “My Macs → Install apps”: pick apps and install them in one click

On your own Mac, keep using brew install --cask for graphical apps. Both routes install the same app — pick whichever is more convenient.

Moving to a new Mac: restore everything with a Brewfile

Reinstalling every tool by hand is the worst part of setting up a new machine. Homebrew’s built-in brew bundle turns your whole setup into a single text file:

brew bundle dump --file=~/Brewfile

Keep that file somewhere safe — a Git repository works well. On the new Mac, install Homebrew, then run this in the same directory:

brew bundle --file=~/Brewfile

It installs every formula, cask, and tap from the list in one go. Re-run brew bundle dump now and then to keep the list current, and the same file keeps two Macs in sync.

Background services: brew services

Databases and web servers that need to keep running in the background are managed with brew services, which wraps macOS’s built-in launchd:

brew services start postgresql@16   # start now, and on every login
brew services stop postgresql@16    # stop, and don't auto-start
brew services restart postgresql@16 # restart
brew services list                   # status of every managed service

It is far simpler than writing launchd configuration files by hand, and it is the standard way to run PostgreSQL, Redis, or nginx for local development.

What’s new in 7.0 (September 2026)

Homebrew 7.0.0, released 13 September 2026, is the biggest release in years. The highlights:

FAQ

I get command not found: brew after installing. Your PATH is missing the Homebrew directory. Follow the “add brew to your PATH” section above: add eval "$(/opt/homebrew/bin/brew shellenv)" to ~/.zprofile, then open a new Terminal window.

Can I run sudo brew install? No. Homebrew refuses to run as root, and putting sudo in front will error out. The installer itself asks for your admin password when it needs it; everyday installs never need sudo.

My disk is nearly full. What helps? Run brew cleanup first — it removes old versions and cached downloads, often freeing several gigabytes. brew autoremove removes packages nothing depends on any more.

How do I uninstall Homebrew? The project ships an official uninstall script:

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

It removes Homebrew and everything it installed, but leaves your own files alone.

On Tokyo Mac

When you order from Tokyo Mac, you can tick the option to have Homebrew pre-installed, so the machine is ready to use without running the installer or dealing with admin passwords. Common graphical apps go through “My Macs → Install apps” in one click, and a standard user account is enough. And if the environment gets messy or the disk fills up with large apps and models, “My Macs → Actions → Erase and reset” wipes the Mac back to a clean system — you pick the apps to install during the reset, it takes a few minutes, and your rental term stays the same.

More guides