Installation

The Missing Package Manager for macOS.

Overview

Install Homebrew:

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

This script installs Homebrew to its preferred prefix:

  • /usr/local for macOS Intel

  • /opt/homebrew for Apple Silicon

so that you don’t need sudoarrow-up-right when you brew install. It is a careful script; it can be run even if you have stuff installed in the preferred prefix already. It tells you exactly what it will do before it does it too. You have to confirm everything it will do before it starts.

macOS Requirements:

  • macOS Catalina (10.15) or higher

  • Command Line Tools (CLT) :xcode-select --install

Git Remote Mirroring

You can use geo-localized Git mirrors to speed up Homebrew's installation and brew update by setting HOMEBREW_BREW_GIT_REMOTE and/or HOMEBREW_CORE_GIT_REMOTE in your shell environment with this script:

The default Git remote will be used if the corresponding environment variable is unset.

Unattended installation

If you want a non-interactive run of the Homebrew installer that doesn't prompt for passwords (e.g. in automation scripts), prepend NONINTERACTIVE=1arrow-up-right to the installation command.

Uninstallation

If you want to run the Homebrew uninstaller non-interactively, you can use:

Download the uninstall script and run /bin/bash uninstall.sh --help to view more uninstall options.

Last updated