Skip to main content

Homebrew

Homebrew is a package manager for macOS. You can use it to install software from your terminal.

Installation

To install Homebrew, run the following command in your terminal:

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

Usage

Install a package

To install a package (formula in Brew terminology), run the following command in your terminal:

brew install <formula> [<formula> ...]
note

Some packages are casks (graphical applications). To install them, use the command brew install --cask <formula>. When in doubt, you should search for the package on the Homebrew website or via the command brew search <formula>.

note

When you install a package, Homebrew also updates all the packages already installed, which can take some time!

Uninstall a package

brew uninstall <formula> [<formula> ...]

Update Homebrew

To update Homebrew, run the following command in your terminal:

brew upgrade <formula> [<formula> ...]

Install Intel packages on Apple Silicon

If you are using a Mac with an Apple Silicon chip (M1/M2/M3), you can install Intel packages thanks to Apple Rosetta 2.

Why? Because some packages are not yet available in native version for Apple Silicon. You can check this list to see if your packages are available in native version.

If you haven't activated Rosetta 2, you can do so by running the following command in your terminal:

softwareupdate --install-rosetta

Then, to install an Intel package, run the following command in your terminal:

arch -x86_64 brew install <formula> [<formula> ...]

arch -x86_64 permet d'exécuter une commande en mode Intel.

Ressources