How to install Homebrew on Mac

Homebrew installs apps and command-line tools on a Mac with one Terminal command each, and updates them all at once. Here is how to install it with the official command, make Terminal find brew and start using it.

Homebrew

  • macOS 15 or later fully supported
  • Apple Silicon and Intel
  • Free, open source

The links go to the developer’s website (brew.sh). MacWashing is not affiliated with the developer and keeps no installers.

  1. Open github.com/Homebrew/brew/releases/latest.
  2. Under Assets, download Homebrew-<version>.pkg.
  3. Open it, click Continue and Install, and enter your Mac password.
  4. Then make Terminal find brew, as described below.

Before you start

You need an administrator account on your Mac and an internet connection. Xcode is not needed: if the Command Line Tools for Xcode are missing, the installer downloads them itself.

On Apple Silicon, Homebrew supports macOS 15 Sequoia and later. On macOS 11–14 it may work but is unsupported. Intel Macs get the lowest level of support.

Install Homebrew with one command

  1. Open Terminal: Applications › Utilities › Terminal, or press Command-Space and type Terminal.
  2. Copy the command below, paste it into Terminal and press Return.
  3. Enter your Mac password when asked. Terminal shows nothing while you type it. Press Return.
  4. The installer lists what it will do. Press Return to go on and wait: downloading the Command Line Tools can take a while.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

This is the command from brew.sh, Homebrew’s official site.

Make Terminal find brew

On Apple Silicon, Homebrew lives in /opt/homebrew, where Terminal doesn’t look by default. The installer prints these lines under Next steps. Run them one by one:

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

On an Intel Mac, Homebrew goes to /usr/local, which Terminal already knows. Either way, check the install with:

brew doctor

Install and update apps

  • brew install --cask <app> installs an app from its developer’s site, for example brew install --cask google-chrome. See also how to install Spotify and VS Code.
  • brew search <name> finds the exact name of an app or tool.
  • brew upgrade updates everything Homebrew installed, except apps that update themselves.
  • brew cleanup deletes old versions and downloaded installers from Homebrew’s cache in ~/Library/Caches/Homebrew.

Alternatives to Homebrew

Keep your Mac tidy

MacWashing, System Junk: Xcode junk, user caches, installers and logs found, 22.83 GB ready to be cleaned

Homebrew and other developer tools keep downloads and caches that grow with every install. System Junk in MacWashing finds the caches apps and developer tools build up and shows how much space they take.

Free trial · macOS 14 or later

Questions and answers

Is Homebrew safe?

Homebrew is open source and widely used. It downloads apps from their developers’ sites and checks the files against known checksums where the developer publishes stable files.

Do I need Xcode for Homebrew?

No. Homebrew needs only the Command Line Tools for Xcode, a much smaller download, and the installer gets them for you.

How do I uninstall Homebrew?

Homebrew has its own uninstall script on GitHub, in the Homebrew/install repository: uninstall.sh. Run it the same way as the install command.