Package Management with Homebrew on macOS Tahoe
While macOS Tahoe comes with excellent built-in tools, installing third-party software and command-line utilities is best handled by a package manager. Homebrew is the de facto standard for macOS.
This guide assumes you are familiar with the terminal. If not, please review Getting Started with macOS Tahoe.
What is Homebrew?
Homebrew installs the stuff you need that Apple didn't. It compiles and installs software packages into its own directory and then symlinks their files into /usr/local (or /opt/homebrew on Apple Silicon).
Installation
To install Homebrew, open your terminal (Zsh is the default in Tahoe) and run the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Follow the on-screen prompts to complete the installation. You may need to add Homebrew to your PATH in your .zshrc file, as discussed in the Advanced Zsh Configuration guide.
Essential Commands
Once installed, you can use the brew command to manage packages.
Searching for Packages
Not sure of the exact package name? Search for it:
brew search python
Installing Packages
To install a command-line tool (formula):
brew install wget
To install a GUI application (cask):
brew install --cask firefox
Updating and Upgrading
Keep your package definitions up to date:
brew update
Upgrade all installed packages to their latest versions:
brew upgrade
Removing Packages
To uninstall a package:
brew uninstall wget
Cleanup
Homebrew keeps older versions of packages. To free up space, run:
brew cleanup