Nearly every macOS setup guide starts with "install Homebrew" — here's what it's actually doing and how to use it well beyond the initial install command.
What it solves
macOS doesn't ship with a package manager for developer tools the way Linux distros do. Homebrew fills that gap: it installs, updates, and removes command-line tools and libraries in a consistent way, tracking what's installed so you're not manually downloading and configuring binaries.
Formulae vs. casks
This distinction confuses people early on:
brew install wget # a formula — a command-line tool or library
brew install --cask slack # a cask — a GUI applicationFormulae are command-line tools, libraries, and their dependencies — things like git, node, ffmpeg. Casks are macOS GUI applications — things like Slack, Docker Desktop, Visual Studio Code. Both are managed through the same brew command, just with the --cask flag for the latter.
The commands you'll actually use
brew install <package> # install
brew uninstall <package> # remove
brew list # see everything installed
brew search <term> # search available packages
brew info <package> # see details, including dependenciesKeeping things updated
brew update # update Homebrew's own package index
brew outdated # see what has newer versions available
brew upgrade # upgrade everything outdated
brew upgrade <package> # upgrade just one packagebrew update updates Homebrew's knowledge of what versions exist; brew upgrade actually installs newer versions of what you have. Running update without upgrade won't change anything installed — a common point of confusion.
Cleaning up
Homebrew keeps old versions and cached downloads around by default, which adds up over time:
brew cleanup # remove old versions and cached downloads
brew cleanup --dry-run # see what would be removed, without removing itManaging your setup declaratively with a Brewfile
For reproducing a setup across machines (or after a fresh install):
brew bundle dump # generate a Brewfile from what's currently installed
brew bundle install # install everything listed in a BrewfileA Brewfile looks like:
brew "git"
brew "node"
cask "visual-studio-code"
cask "docker"Checking this file into a dotfiles repo means a new machine can be brought up to your exact toolset with one command, instead of remembering (or re-Googling) what you had installed.
Troubleshooting: brew doctor
brew doctorRuns a diagnostic check and reports common configuration problems — permission issues, conflicting files, outdated Xcode Command Line Tools. Worth running whenever something Homebrew-related starts behaving strangely, before troubleshooting further by hand.