This is a seven-step guide on how to install Homebrew on a Mac. What is Homebrew and why should you install it? Since macOS doesn’t come with a package manager, people use Homebrew as an alternative. A package manager is a helpful tool that allows you to install, update, and manage software on your computer. With Homebrew, you can install command line tools, programming languages, and many other software packages with just a few simple commands in the Terminal.
In this step-by-step guide, I’ll show you how to install Homebrew on your Mac, set it up, install packages, update packages, and uninstall packages. This guide is designed for beginners and assumes that you have little to no experience with the Terminal. This article even provides a sample alias that can help you update packages at the end. So, let’s get started and learn how to install Homebrew on your Mac!
Step 1: Install command line tools for Xcode
Before installing Homebrew, you first need to install the command line tools for Xcode. Open up The app store and search for Xcode. Depending on your internet connection speed, the download of this 7.5 GB file might take some time. You can also install Xcode by opening a terminal and downloading it through the command line by running the following command:
xcode-select --install
Follow the installation process to install the command line tools for Xcode.
Step 2: Install Homebrew on Mac
Once you have installed the command line tools for Xcode, you can now proceed with installing Homebrew. To do this run the following command in the Terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
This command will automatically download and install Homebrew on your Mac. You will be prompted to enter your password to complete the installation.
For more detailed installation instructions refer to the Homebrew Documentation
Step 3. Turn off analytics
This step isn’t mandatory but highly suggested. Homebrew collects anonymous analytics data by default for all users. This data is used to improve Homebrew’s features and performance. If you want to opt-out of this feature, run the following command in the Terminal:
brew analytics off
Step 4. Test Installation
To test the installation and ensure that Homebrew is working correctly, run the following command in the Terminal:
brew doctor
If your installation was successful you should get a message saying “Your system is ready to brew!” If there are errors in the output of the command, you may need to fix them.
Step 5: How To Install Packages
To install a package using Homebrew, simply type the following command in Terminal:
brew install [package name]
Replace [package name] with the name of the package you want to install.
An example to install yt-dlp will look like this:
brew install yt-dlp
Step 6: How to update packages
To update packages installed through Homebrew, run the following command in Terminal:
brew update && brew upgrade
This command will update Homebrew and all packages installed through it.
Step 7: How to uninstall Homebrew packages from Mac
To uninstall a package installed through Homebrew, run the following command in Terminal:
brew uninstall [package name]
Replace [package name] with the name of the package you want to uninstall.
Post Installation (Searching, and Updating Packages)
You can always search for new packages by running the following command in the Terminal:
brew search [package name]
Replace [package name] with the name of the package you are searching for.
Now that you have Homebrew installed you can install many packages such as ffmpeg, mpv, and other useful open-source projects.
Quickly Update and Upgrade Packages
In case you encounter an issue where a package suddenly stops working, updating it might be necessary. To simplify the process of updating your packages, you can create an alias instead of manually running the commands every time an update is needed. Here is an example of an alias that you can add to either your .bashrc or .zshrc file, as promised. It will allow you to quickly update and upgrade packages using a single command:
alias bupdate='brew update && brew upgrade'
To get further assistance, please refer to the articles on creating an alias. You can find Part 1 and Part 2 of the series on our website.
Finding Help and Documentation
And that’s it you’re done! This was a quick and easy guide on how to install Homebrew on Mac.
For more documentation on updating packages and other Homebrew commands, visit the official Homebrew documentation or refer to the man page by typing the following command in Terminal:
man brew
That’s it for this tutorial. I hope you were able to successfully install Homebrew on your Mac and start using it to manage packages. If you have any questions or suggestions, please leave them in the comments section below.




