How to install Homebrew in macOS Catalina or M1 Mac

How to install Homebrew on Mac

Homebrew is an open-source package manager for macOS that offers an easy way to install software and tolls through the command line. If you are a coder, developer, Terminal lover, or more tech-savvy than an average Mac user, you can use Homebrew to simplify software installation on your Mac.

Homebrew lets you use commands to download and install Python, Ruby, MongoDB, PHP, Git, Node.js, cask, colordiff, Nmap, and other Unix command-line utilities. In this guide, I’ll show you how to install Homebrew in macOS Catalina or M1 Mac.

Requirements to install Homebrew on Mac

  • A 64-bit Intel or Apple Silicon M1 CPU
  • macOS Mojave (10.14) or later
  • Command Line Tools (CLT) for Xcode (steps 1 and 2 below)
    Note: Some formulae require full Xcode installation.
  • A Bourne-compatible shell for installation (e.g., bash or zsh)
  • Administrator access on Mac
  • Internet connectivity

For some finer requirement details, please see the official page.

Once you satisfy the above requirements, see how to install Homebrew on macOS.

How to install Homebrew on macOS Catalina or M1 Mac

  1. Open Terminal and enter this command xcode-select --install
  2. Click Install from the popup. Go through the T&C and click Agree if you do. Let the download complete.Get Command Line Tools and Install on your Mac
  3. To install Homebrew, enter the following command in the Terminal. /usr/bin/ruby -e "$(curl -fsSL"Command to install Homebrew on Mac
  4. You will have to enter your Mac’s password once. After that, the downloading and installation will begin. The total download size is around 400MB. It will take some time.Successful installation of Homebrew on Mac

Verify Homebrew installation in macOS

  1. Open Terminal and type brew -v
  2. You will see the version of Homebrew installed on your Mac.How to verify Homebrew installation

Tip: brew doctor lets you know about Homebrew status, issues, and updates, if available or required.

Now that you have installed Homebrew, let’s see how to use it.

How to use Homebrew to install a package on Mac

  • To see the full list of packages: brew formulae
  • To search a software package: brew search packagename
  • Get information about a package: brew info packagename
  • To download and install: brew install packagename
    For example, if I have to install speedtest-cli, here is how the command looks: brew install speedtest-cliHow to download and install package using Homebrew
    After installation, enter speedtest-cli in the Terminal to run this command.
  • Pro Tip: You can install not only command-line apps but also GUI (Graphical User Interface) apps via Homebrew. For this, use brew install --cask app-name. For example, brew install --cask firefox or brew install --cask google-chrome You can see the full list here.
  • To see all the apps installed by Homebrew on your Mac: brew list
    Tip: Packages are usually installed in this folder: /usr/local/CellarSee where Homebrew packages are stored on Mac
    In case you do not find this folder, enter brew --prefix in the Terminal to see the folder location.
  • To update the package: brew update packagename
  • For removing an installed package: brew remove packagenameHow to remove an installed package using Homebrew
  • To know what else you can do: man brew

How to update or remove Homebrew from your Mac

At times, Homebrew is updated automatically when you run commands. But you can also update it manually by entering brew update in the Terminal.

How to remove Homebrew from your Mac

In case you no longer need Homebrew, run the following command to uninstall Homebrew and all the installed packages.
ruby -e "$(curl -fsSL"

Loving the ease and simplicity of Homebrew!

I hope the above guide helped you download, install, and use Homebrew. Once you start using it, there is no going back. Finally, I would like to tell you about four handy command-line programs I love.

  • Youtube-dl: This lets me download videos from YouTube and other places. More info.
  • speedtest-cli: I can see my download and upload speed via this. More info.
  • imagemagick: Lets me convert an image to another format and make simple edits. More info.
  • wifi-password: This brilliant yet straightforward command shows me the Wi-Fi password of the currently connected network. Super handy!

You will also love to read:

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.