A Quick Guide to Homebrew

The best package manager for Mac

Neo Hao Jun
Mac O’Clock
3 min readMay 26, 2020

--

Photo by Homebrew

macOS has an app store. But it probably won’t contain all the software, apps, and utilities you need. Especially if you are an advanced user who requires access to plenty of tools for work, you’ll realise that macOS lacks a good package manager. And that’s where Homebrew come in.

What is Homebrew?

Homebrew, put simply, is the missing package manager for macOS (it’s their slogan after all). Homebrew installs stuff that you need that Apple didn’t or aren’t available on the Mac App Store. With a simple brew install or brew install —-cask. No more ‘Drag this icon into the Applications folder’.

Want to read this story later? Save it in Journal.

No more of this
And instead you do more of this (Source: Homebrew on GitHub)

Installation

To install Homebrew, you would need

  • Command Line Tools (CLT) for Xcode
  • A Bourne-compatible shell for installation (bash or zsh)

Initial Setup

To check if you have Xcode CLT on your Mac, run this in your terminal:

The return value will be 2 if they do NOT exist, and 0 if they do.

To get CLT for Xcode, download the Xcode app on the Mac App Store or run the following in your terminal:

To change your terminal shell, here’s a pretty helpful guide.

Now that you’re all set up, copy and paste the following into your terminal:

Voila! You’re now ready to use brew on your Mac.

Some Tips

This installs brew cask. Homebrew typically deals with command line software. brew cask is an extension to brew which deals with Graphical User Interface (GUI) applications. You can now use brew install --cask... in addition to brew install....

Follow the following steps to update your local packages:

This updates the formulae and Homebrew itself.

This checks for formulae which are outdated.

This upgrades all your packages.

This upgrades a specific formula.

To keep your software up to date, I would recommend running brew update and brew upgrade regularly.

This searches for casks and formulae. To get a more comprehensive list, you can use the built in search function on Homebrew’s Home page.

This uninstalls any software you have installed using brew.

This uninstalls any GUI applications you have installed using brew.

This uninstalls old versions of a formula. (Homebrew should uninstall old versions of a formula every 30 days by default)

Have fun experimenting with Homebrew! More information can be found on their documentation.

Here’s an article you may like to check out. (Yes, all the apps can be installed with brew cask)

📝 Save this story in Journal.

👩‍💻 Wake up every Sunday morning to the week’s most noteworthy stories in Tech waiting in your inbox. Read the Noteworthy in Tech newsletter.

--

--