What Homebrew does and why you need it
Homebrew is a package manager that installs development tools, libraries, and command-line programs on your Mac without cluttering your system. Instead of hunting down installers across the web, you type one command and Homebrew downloads, installs, and updates the software for you. It saves hours of configuration work.
You arrived here from the package manager overview, so you already know Homebrew handles the repetitive parts of setting up a development environment. On a Mac, it's the standard choice because it integrates with the system you already have rather than fighting it.
Key Takeaways
- Homebrew requires the Command Line Tools for Xcode, which you install first through the Terminal.
- The Homebrew installer is a single command you paste into Terminal, and it walks you through the rest.
- After installation, you verify Homebrew works by typing brew --version in Terminal.
- Once installed, you use Homebrew to install other tools by typing brew install followed by the tool name.
Install the Command Line Tools first
Homebrew needs the Command Line Tools for Xcode to work. These are free development utilities that come from Apple. You don't need the full Xcode process — just the tools.
Open Terminal (find it in Applications > Utilities, or press Command + Space and type Terminal). Paste this command and press Enter:
xcode-select --install
A dialog box appears asking if you want to install the Command Line Tools. Click Install. The read is about 500 MB and takes 5 to 15 minutes depending on your internet speed. When it finishes, you'll see a message saying the tools were installed successfully. You can close Terminal.
If you see a message saying the tools are already installed, you're ready to move forward — you don't need to do anything else.
Run the Homebrew installer
Open Terminal again. Go to the official Homebrew website (brew.sh) and copy the installer command from the home page. It's a long line that starts with /bin/bash. Paste it into Terminal and press Enter.
The installer shows you what it's about to do and asks for your password. Type your Mac login password (the one you use to unlock your computer) and press Enter. The password won't show as you type — that's normal. The installer then downloads Homebrew and sets it up. This takes 2 to 5 minutes.
When the installer finishes, it tells you the installation was successful and shows you next steps. You can close Terminal.
Verify the installation worked
Open Terminal one more time and type this command:
brew --version
Press Enter. If Homebrew installed correctly, you'll see a version number like "Homebrew 4.0.0" or similar. If you see an error or "command not found", the installation didn't complete. Go back and check that you ran the installer command exactly as it appears on brew.sh.
You now have Homebrew ready to use. The next step is installing the specific tools your project needs — you'll do that by typing brew install followed by the tool name.
Understanding what happens during installation
When you run the Homebrew installer, it creates a folder called Homebrew inside your Mac's system directories and downloads the software that manages packages. It also adds Homebrew to your system PATH, which is the list of places your Mac looks for programs when you type a command in Terminal.
This is why you need your password — Homebrew needs permission to write to system directories. The installer only asks once, and after that Homebrew runs without needing your password for routine installs.
If you're on an Apple Silicon Mac (M1, M2, M3, or newer), Homebrew automatically detects this and installs the correct version. You don't need to do anything different — the installer handles it.
Troubleshooting common installation problems
If the installer fails partway through, the most common cause is that the Command Line Tools didn't install properly. Open Terminal and run xcode-select --install again. If it says the tools are already installed but Homebrew still won't work, try this command to reset the tools:
xcode-select --reset
Then run the Homebrew installer again. If you get a permission error during installation, make sure you typed your Mac password correctly. If you've never set a password on your Mac, you'll need to create one in System Settings before Homebrew can install.
If Homebrew installs but brew --version still shows "command not found", your system PATH wasn't updated. Close Terminal completely and open it again — sometimes this fixes the issue. If it persists, the installer output usually shows a command you can run to fix the PATH manually.
What to do after Homebrew is installed
Once you've verified Homebrew works, you're ready to install development tools. The most common next step is installing a programming language like Python, Node.js, or Ruby. You do this by typing brew install followed by the name — for example, brew install python3 or brew install node.
You can also use Homebrew to install command-line utilities, databases, and other software. To see what's available, visit formulae.brew.sh or type brew search followed by a keyword in Terminal. Homebrew also updates itself and all installed tools when you run brew upgrade, so you stay current without hunting for updates manually.
Frequently Asked Questions
Do I need Xcode to use Homebrew?
No. You only need the Command Line Tools, which are much smaller and faster to install than the full Xcode process. The tools give Homebrew everything it needs to compile and install software.
Can I install Homebrew if I already have Xcode?
Yes. If Xcode is already on your Mac, the Command Line Tools are already installed, and you can skip straight to running the Homebrew installer. Homebrew works alongside Xcode without conflicts.
What if I'm on an older Mac or an Intel Mac instead of Apple Silicon?
Homebrew works the same way on both. The installer detects your Mac's processor and installs the correct version automatically. You don't need to do anything different.
Can I uninstall Homebrew if I change my mind?
Yes. The Homebrew website has an uninstall script you can run in Terminal. It removes Homebrew and everything you installed with it, but leaves your other files untouched. You can reinstall it anytime by running the installer again.
Why does Homebrew ask for my password during installation?
Homebrew needs to write files to protected system directories. Your password confirms you have permission to make those changes. After installation, you won't need your password for routine package installs.