How to install Homebrew in macOS Ventura or M1/M2 Mac

How to install Homebrew in macOS Ventura or M1:M2 Mac

Things to know before installing Homebrew on Mac:

  • It is compatible with both Intel and Apple Silicon chips M1/M2 Macs
  • Available for macOS Big Sur and later
  • Xcode is a pre-requisite

For years, Mac has lacked a standard way for installing command-line tools, but not anymore. Homebrew is the ultimate solution for making it easy to install third-party software on your Mac. With the software, you can access a large library of open-source tools, which can help you modify your system and operate more effectively. In this article, I’ll show you how to install Homebrew on your Mac.

What is Homebrew on Mac?

Homebrew is a lightweight open-source software package management system for Mac. You can use the program to install and administer numerous command-line utilities and apps on your Mac. However, according to the software creators, “Homebrew is a software that installs the stuff you need, but Apple didn’t.”

With an easy-to-use interface, the software offers a vast collection of packages that are easy to install and update using some simple commands, which makes it ideal for those who are looking to keep the software updated without any hassle. 

With the help of Homebrew, you can easily install tools and libraries like Git, Python, Node.js, PHP, etc., and manage them effortlessly with the help of a simple command-line interface. Furthermore, it’s designed to be flexible, allowing you to customize the installation process and configure it to suit your specific requirements. Hence, with the program, you can streamline your workflow and improve overall productivity.

Benefits of using Homebrew on Mac

  • It’s easy to install and set up. It requires only a few simple commands in the Terminal.
  • Managing various software packages on a Mac is easy. It simplifies the process of updating, installing, and uninstalling software.
  • It maintains a centralized repository of software packages, making it easy to find and install the software you need.
  • The program is maintained well as it’s an open-source package manager, and anyone can contribute to its development.
  • You save time as the software automates the downloading, compiling, and installing. It eliminates the need to hunt down software installers and manually run installation procedures.
  • The package manager lets you choose which version of a particular software package you want to install and customize the installation.
  • The program is designed to be secure and doesn’t require root access to install the software to prevent security and vulnerabilities.

Requirements to install Homebrew on Mac

Before we deep dive into the details of installing Homebrew on Mac, let’s make sure your Mac matches the fundamental prerequisites for running the software:

  • CPU: 64-bit Intel, Apple Silicon M1/M2
  • macOS: Big Sur or later
  • Command Line Tool (CLT): Xcode
  • Installation: Bash (Bourne-again shell)

How to install Homebrew on Mac

Now that you’ve ensured that your Mac meets all of the requirements, look at the detailed steps to install Homebrew on your Mac.

As installing Homebrew on Mac involves writing numerous lines of code in the Terminal, ensure that you explicitly follow the instructions mentioned below.

Install command line tools for Xcode

Xcode is a macOS native Integrated Development Environment (IDE). It provides a set of tools that developers use to create software, such as compilers, build systems, and debuggers. Because Homebrew relies on command-line tools, the Xcode application must be installed.

Follow the steps below to install Xcode on Mac.

  1. Open Spotlight (Cmd (⌘) + space Bar).
  2. Search and open Terminal.
  3. Write the following command xcode-select --install → hit return.

    Install command line tools for Xcode
  4. Select Install.

    Select Install on Mac
  5. Once you’ve gone through the License Agreement, then choose Agree.

    Click Agree on Mac
  6. If your Mac is not connected to a power source, you might be prompted to. If there’s enough charge, choose to Continue on Battery Power.
  7. It will take some time for the software to download.
  8. Complete the process by clicking Done.

If your Mac is not charging, you’ll be prompted a dialogue box that asks you to confirm the download over the existing battery.

Note: You can also use any other IDE that supports Mac development for the process, but you must have one to access the command-line tools that Homebrew requires.

Get Homebrew on Mac

Now that you’ve installed an IDE, here’s how to obtain Homebrew on Mac. To do so, use the instructions listed below.

  1. Launch Terminal.
  2. Write the following command: /bin/bash -c "$(curl -fsSL" → hit return.

    Get Homebrew on Mac
  3. Now, enter your Mac password.
  4. Hit the return key on your keyboard to continue.

    Hit return key on your keyboard to continue
  5. Your screen will now display an Installation Successful message.

    Mac screen will now display an Installation Successful

Congratulations! You’ve just finished installing Homebrew on your Mac.
Remember that the installation time can vary based on your network connection and speed.

Note: If you’re facing issues while installing Homebrew on M1 Macs, then you can try running these extra commands.

Set Homebrew path

Once you have installed the Homebrew software, the subsequent crucial step is to configure the path to ensure the seamless operation of the program.

  1. Head to Terminal.
  2. Copy the below-mentioned commands one by one and hit return after each command.
    • cd /opt/homebrew/bin/
    • ls
    • PATH=$PATH:/opt/homebrew/bin
    • cd
    • touch .zshrc
    • echo export PATH=$PATH:/opt/homebrew/bin -> .zshrc
    • brew doctor

      Verify Homebrew installation in macOS

Once the message “Your system is ready to brew” appears on your screen, you can proceed confidently, knowing that everything is in place for you to begin your brewing process.

Verify Homebrew installation in macOS

When you’ve installed Homebrew, the next suggested step is to check and see if the program is successfully installed. You can simply accomplish this by using the instructions shown below.

  1. Open Terminal.
  2. You can try any of these commands:
    • brew –v
    • brew -version
    • brew doctor
  3. You’ll now see Your system is ready to brew.

Using this command will provide useful information on the health and performance of your Homebrew installation, allowing you to take the required steps to act on any issues discovered.

How to disable Homebrew analytics

Homebrew is free, open-source software that collects and shares data with developers to improve its user interface. As a result, if you don’t want to contribute or share your user information, you may shut down Homebrew analytics.

Remember that this step is optional, but I recommend you follow the steps underneath and disable analytics to keep your data safe and secure.

  1. Launch Terminal.
  2. Run command brew analytics off.

    How to disable Homebrew analytics

Installing software using Homebrew

You may quickly install apps on your Mac after validating Homebrew’s successful installation and functional operation. The procedure is simple and painless if the following steps are followed precisely:

  1. Open the Terminal app.
  2. Enter the command brew install {packageName} into the Terminal window.  
    For instance, to install the wget package, type brew install wget.

    Installing software using Homebrew

In the example stated above, I’ve taken the wget package as an example. Feel free to substitute the packageName with another packageName. Additionally, you can also check the list of packages installed on your Mac using the command brew list.

Keeping Homebrew up to date

In order to ensure that our software is free from bugs and has up-to-date security features, it’s imperative to update Homebrew regularly, just as we update macOS.

This practice allows you to leverage the newest features and gain additional compatibility, support, and improved functionalities. Updating Homebrew is a straightforward process accomplished through the Terminal by mirroring the steps below.

  1. Launch Terminal.
  2. Run the command brew update.

In addition to the software, this command also enhances the installed packages to access the latest features as it updates them to their latest iterations.

How to uninstall Homebrew from Mac

If you have decided to remove Homebrew from your Mac, you may do it easily by following the instructions outlined below.

  1. Launch Terminal.
  2. Run the command /bin/bash -c "$(curl -fsSL"

    Run commond to uninstall Homebrew from Mac
  3. Type y in the Terminal screen.

    Type Y to uninstall Homebrew from Mac
  4. Enter your Mac password.

Excellent work! You have successfully removed Homebrew from your device.

Also, you can avoid this hassle by using the following command for a non-interactive Homebrew software removal NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL"

How to uninstall Homebrew packages from Mac

Nevertheless, if you prefer not to eliminate Homebrew but rather desire to uninstall or delete specific packages, you can effortlessly achieve that by executing the following commands.

  1. Open Terminal.
  2. Copy the command brew uninstall wget on the Terminal window.


Is Homebrew necessary for Mac?

No, Homebrew is not mandatory for Mac. However, it may be a valuable tool for organizing packages and installing apps on your device.

Where is Homebrew installed on Mac M1?

Your Homebrew on your M1 Mac Air is typically installed in the /usr/local/homebrew.

Can I use Homebrew to install graphical applications?

Indeed, you can use the Homebrew utility to easily install various graphical apps on your Mac.

Is Homebrew available for M2 Mac?

Yes, the Homebrew software does function on the M2 Macs. However, you may need to add an extra line of code when installing it.

So much more to Homebrew…

Are you not enjoying having a straightforward method to install apps on your Mac? Regardless of whether you’re a developer, sysadmin, or regular Mac user, Homebrew is an impressive tool that can elevate your machine’s performance.

Have you still not installed Homebrew on your Mac? Give Homebrew a try today and witness its ability to enhance your Mac experience! Additionally, remember to peruse my recommendations below.

You will also love to read:

Readers like you help support iGeeksBlog. When you make a purchase using links on our site, we may earn an affiliate commission. Read Disclaimer.


  1. i tried lot of time to instal homebrew in my macbook air M2 2022 but all the time error show and the error is
    (curl: (28) Failed to connect to port 443 after 75246 ms: Couldn’t connect to server)
    show please solve my problem for this help i always thankfull to you

    1. The error you’re encountering, “curl: (28) Failed to connect to port 443 after 75246 ms: Couldn’t connect to server,” indicates that your Mac is unable to connect to GitHub’s servers during the Homebrew installation process. This could be due to a network connectivity issue or a DNS problem.

      To resolve this error, you must ensure that you’re using a stable internet connection and use Google Public DNS.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.