Homebrew

Written & tested for accuracy by a developer (not AI)

What Is Homebrew?

What is Homebrew, and is Homebrew safe? The software package manager most Mac developers use: what it installs, where the files go, and its beer-themed terms.

Homebrew is a package manager to install software programs for the command line. This is all about Homebrew, what to use it for, alternatives, amount of time needed for installation, and Homebrew terminology. This article offers explanations that are missing from the official Homebrew site (brew.sh).

Installing Homebrew is one step in setting up your Mac for development. See the complete Mac setup checklist.

Before you get started

I recommend using our free app to install Homebrew on your Mac. It is a FREE Mac app that installs Homebrew, configures Homebrew, and verifies it is working. It does everything this guide covers, but easier and faster. Here are all the details about the app before you download. Then:

The app is the easiest way to install Homebrew on your Mac, but if you want to know more about Homebrew, here is a guide.

Install Homebrew

Step-by-step instructions:

Covers the shell configuration step that is easy to get wrong. Also what to do if you have an Intel Mac.

About Homebrew

Homebrew is a package manager for macOS (and Linux, too). It is one of the first tools you'll need to set up a local development environment for programming on a Mac. Use it to install (and remove) software programs for the terminal, or command line. It is like an app store for programming tools (but everything is free). MacOS includes some pre-installed programming languages and command line utilities but most work requires newer versions of languages and tools not provided by Apple. Get what you need with Homebrew. Almost every useful open source program (or "package") is available through Homebrew, with a single tool to install and manage each one. Homebrew's biggest drawback? A cute terminology of kegs, casks, bottles, and other beer-themed terms, explained here.

Is Homebrew safe?

Homebrew is safe for most people, most of the time. The install command asks you to download and run a script from the internet, which understandably makes people nervous. Here is what you're trusting when you run it.

Homebrew is open source and has been developed in public since 2009. Its install script is a plain text file hosted on GitHub, and you can read the install script in your browser before you run it. The script is downloaded over HTTPS from Homebrew's official repository, and changes to it go through public review. It will ask for your administrator password once, to create the Homebrew folder (/opt/homebrew on Apple Silicon) and to install Apple's Command Line Tools if needed. It then gives your user account ownership of that folder, so later installs don't need administrator access.

After installation, the brew command refuses to run as root, so there's no need to use sudo for administrator privileges. Homebrew packages are installed into the folder your account owns rather than across the whole system. This limits how much damage a faulty or malicious package can do, though anything running under your account can still reach your own files.

Homebrew reduces the risk of supply chain attacks, where an attacker tampers with software upstream, through curation and review. The formulae and casks in Homebrew's official repositories are written and maintained by Homebrew maintainers, not the software's authors. Every change is submitted as a public pull request, tested by automated CI, and approved by a maintainer. Most formulae are installed as bottles, which are precompiled binaries that Homebrew builds on its own CI servers and verifies with checksums. When you build from source instead, Homebrew runs the upstream build scripts inside a macOS sandbox. Homebrew doesn't review those build scripts line by line, so the sandbox limits what they can do.

These protections have limits:

  • Upstream compromise. If malicious code gets into a project's official source release and nobody notices, Homebrew can package it. Review makes this harder but can't rule it out.
  • Not every package gets the same scrutiny. The main collection is reviewed by Homebrew's maintainers, but anyone can publish a third-party collection (a "tap"), and a cask downloads an application from the vendor's own site. Treat a package from an unfamiliar tap the way you would treat any download from that source.

Keep Homebrew up to date with brew update to get the latest security fixes, and stick to official packages where you can.

Where Homebrew installs files

Homebrew installs files into the /opt/homebrew/ folder, which is not part of the default shell $PATH. You'll need to configure your shell environment so Homebrew packages are found and take priority over pre-installed tools. Every new installation requires it.

The /usr/local/ folder you may read about elsewhere is history now. Homebrew used it on Intel Macs, where it was already covered by the default $PATH, so no shell configuration was needed. The Homebrew team was criticized for that choice, because other programs install software into the same folder and can overwrite Homebrew packages. Homebrew added support for Apple Silicon with version 3.0.0 in February 2021, moved the default folder, and accepted the extra shell configuration step that came with it. The installer dropped /usr/local/ entirely in September 2026, so you will only see it on an Intel Mac that installed Homebrew earlier.

Intel Macs

Homebrew no longer installs on an Intel Mac. Homebrew's maintainers no longer offer new Homebrew installations for Intel-based Macs. The install script displays the message Homebrew on macOS is only supported on Apple Silicon processors! and the package installer won't run on Intel Macs.

Why Homebrew did this. Homebrew maintains extensive build and test coverage for all Homebrew packages. Homebrew retired its Intel build machines in August 2026 after continued support became difficult. The larger context is Apple's phasing out of macOS support for Intel Macs. macOS Tahoe 26 was the last version of macOS that runs on an Intel Mac, and macOS 27 Golden Gate is Apple Silicon only.

If Homebrew is already on your Intel Mac, it keeps working. Anything you previously installed stays installed, and packages already built for Intel can still be downloaded. New or updated packages can still be installed, but they are not pre-built and must compile on your Mac, which takes much longer. Homebrew says it will remove the ability to run on Intel in or after September 2027.

If you need a package manager on an Intel Mac, use MacPorts. It still installs on Intel and still publishes ready-made Intel packages. On macOS Sequoia and earlier, Homebrew's own brew doctor command points Intel users to MacPorts. See MacPorts.

Homebrew and version managers

Understand the difference between Homebrew and software version managers. Homebrew is a package manager that adds a single version of a language such as Python or Ruby to the Mac. It can install one (and only one!) version of a language (the latest version). Installing a language with Homebrew is fine for a student or casual user. However, most professional developers will use Homebrew to install a software version manager that can install and switch between multiple versions of a language. Most developers develop and maintain several applications and each may depend on a different language version. If you are working with multiple languages and multiple versions (for example, Ruby and Node), consider using Homebrew to install Mise on Mac. If you’re on a team with a complex project environment (for example, Ruby, Node, Redis, and PostgreSQL all in one project), you might be asked to use Docker, which is a container system that sets up multiple development environments (like having multiple computers with different configurations).

Alternatives to Homebrew

MacPorts, Fink, pkgin, and Nix are alternatives to Homebrew on macOS. On Linux, developers use apt-get or Homebrew. On Windows, developers use Chocolatey to install programs from the NuGet package library (they also use apt-get under WSL, the Windows Subsystem for Linux).

On the Mac, MacPorts is the alternative for users with Intel-based Macs. It is less developer-friendly than Homebrew: most commands that change your system need sudo or root access, and there are fewer answers online when something goes wrong. But MacPorts is more independent of macOS, ignoring many of the system libraries and software that are already available in macOS, avoiding dependence on Apple's update schedule (Homebrew relies on macOS system libraries for faster set up). MacPorts is also a better choice for a multi-user Mac, should more than one developer be using the same Mac. See MacPorts for how the two compare and how to install it.

Fink is the oldest of the Mac package managers and modifies the Linux apt-get package library. Fink is often not up to date with the latest macOS version. Pkgin installs binaries from the NetBSD (Unix) pkgsrc repository and requires sudo or root access, making it more suitable to a skilled Unix user. Some developers on large teams use the Nix package manager. Nix is very complex but creates fully isolated, reproducible development environments.

Homebrew is the most popular package manager because it is easiest to use and frequently updated. On a Mac with Apple Silicon it remains the recommendation on this site. On an Intel Mac it is no longer an option for a new installation, which makes MacPorts the practical choice.

How long does Homebrew take to install

First time users will ask, how long does it take to install Homebrew? On a 2021 Mac mini with Apple Silicon, with a 100Mbps Internet connection:

  • Homebrew installation takes 2 to 15 minutes.

The install takes longer on an older Mac or over a slow Internet connection. Installing packages can take a few minutes, especially if a pre-built binary is not available and the software package must be compiled during the installation process.

Homebrew terminology

You'll either love or hate Homebrew's cute beer-brewing theme. Part of using Homebrew is understanding its beer-themed terminology. Here are terms; click for meanings.

formulae

A Homebrew formula is a Ruby script that controls the installation of a package. Formulae are contributed by people who maintain software packages. You don't need to know how to write a formula to use Homebrew; you just enter the command brew install <formula>. The homebrew-core repository contains over 4000 packages. Each formula lists the location of the package's source archive and includes directives to build the software from the archive.

tap

A Homebrew tap is a repository that contains Homebrew formulae used to install packages. The default Tap is on GitHub as homebrew-core. The brew tap command allows a developer to use formulae from their own repository without submitting anything for approval by Homebrew.

keg

A Homebrew keg is the folder that contains a specific version of a package that has been installed by Homebrew. The path to the keg contains both the package name and version number, for example /opt/homebrew/Cellar/tree/1.8.0. For most packages, Homebrew creates a symbolic link ("alias" or symlink) from the keg to the /opt/homebrew/bin/ directory so entering the package name as a command will run the installed version from the keg. A few packages are installed "keg-only" which means no symlink is created because the package may conflict with a pre-installed package from Apple. Keg-only packages are usually dependencies needed to install or run other Homebrew packages, avoiding conflicts with macOS system software.

bottle

A Homebrew bottle is a pre-compiled package, sometimes called a "binary." Installation is faster with a pre-compiled package.

cellar

The Homebrew cellar is the directory where Homebrew stores packages. It is the folder /opt/homebrew/. On an Intel Mac that installed Homebrew before September 2026, it is /usr/local/ instead.

cask

A Homebrew cask is like a keg, but contains macOS GUI applications installed from the command line. Casks are not very popular but provide a mechanism to automate the installation of GUI applications from a script or the command line.

mxcl

Homebrew's mxcl is Max Howell, the creator of Homebrew. Not really a term, but good to know.

Continue setting up your Mac

With Homebrew installed, you can Install a Homebrew Package. Be sure to Configure Git and add a language version manager (I recommend Mise). You can use Homebrew to install programming languages such as Java, Python, or Ruby.

Don't miss the full visual roadmap and checklist that shows how to set up a Mac for software development, with all the essential tools and settings you might not yet know about.