Open In App

How to Install Homebrew on macOS - Complete Installation Guide

Last Updated : 23 Jul, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Homebrew is a package manager used for macOS and Linux. Using the users can easily install, update, and manage their various software using the single line command. This Homebrew installation guide will help you through each step of installing Homebrew on your macOS, making your computer more versatile and powerful.

Use of Homebrew

As we said above, it is a package manager that allows you to install thousands of programs not available through the Apple App Store. Using Homebrew, one can easily install a wide range of development tools, applications, and utilities that can enhance your system's capabilities.

Apart from installing new software, one can use Homebrew for updating existing software and handle all necessary dependencies with just a few commands. It also makes it easy to uninstall software, keeping your system clean and organized.

Prerequisites to Install Homebrew

  • A 64-bit Intel CPU or Apple Silicon CPU is recommended.
  • macOS Ventura (13) or the higher version of macOS
  • Command Line Tool for Xcode
  • Bourne-again shell for installation

How to Install Homebrew

In this section, we have listed all the installation steps that you will need to apply to install Homebrew. So follow the steps carefully so you don't get any errors. Also, before installing Homebrew, you need to install Xcode so that Homebrew works properly. 

Steps to Install Xcode Command Line Tool in Mac

Step 1: Go to the Finder and select GO and then click on the Utilities.

Step 2: Now open terminal..

Step 3: In the terminal, enter the below command to install Xcode Command Line Tools.

xcode - select --install

Step 4: Once the pop-up menu appears for xcode-select, click on the Install button to install Xcode.

Step 5: The script will show the Xcode License Agreement. Once you read and agree to the terms, click "Agree" and then wait for the installation process to complete.

Steps to Install Homebrew on Mac

Step 1: First, open Mac Terminal.

Step 2: Use the below command to get an overview of the requirements for installation.

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

Now if you are facing an error like this image shown below:

Operation not permitted while installing brew

Try this Command before running Step 2

sudo chown -R $(whoami) usr/local

Step 3: If no error occurs, enter your administrator password when prompted and press Return to continue. Alos wait till the download is complete.

Note: When you enter your password in the Terminal window, you won't see the characters appear. This is a standard security feature used in command line interfaces to protect your password. Rest assured, even though you can't see them, your keystrokes are still being captured. Just hit the RETURN key after you finish typing your password.

Step 4: Once the installation process is completed, you should see a successful installation message appear.

Successfully installed homebrew

At this stage, you are all set to enjoy the services provided by Homebrew.

Verify Installation of Homebrew

You can verify the installation of Homebrew by using the below command in the terminal.

# brew doctor

Turn Off Analytics

If you are using Homebrew, then you should know that Homebrew anonymously gathers usage data about the users. So if you don't want to share your usage data, then follow the below command.

# brew analytics off

How to Uninstall Homebrew

To uninstall Homebrew from your system, follow the below steps:

Step 1: Open Terminal.

Step 2: Use the below command to uninstall Homebrew.

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

This downloads and runs the uninstaller script. Follow the instructions, and Homebrew will be removed from your computer.

List of Common Commands Used in Homebrew

Once you have installed Homebrew, you can start exploring its features. Below are some of the most frequently used commands that will help you get started.

Update Homebrew

New versions of Homebrew come out frequently, so make sure you update it before updating any of the other software components that you’ve installed using Homebrew. 

Use the below command in the terminal to update to the latest stable version of Homebrew:

 # brew update

This will result in the below output:

Install a package

# brew install <package>

Note: Replace the package for the command with the name of the software that you want to install.

Check for issues

# brew doctor

This command diagnoses any issues with the Homebrew setup.

Conclusion

This guide has shown you how to install Homebrew and the Xcode Command Line Tools, preparing you to fully leverage Homebrew’s capabilities. From enhancing your system's functionality with a vast range of software to maintaining an organised setup, Homebrew is an essential tool for modern computing needs.


Similar Reads