Skip to content

How to get started with Homebrew package manager for macOS

Mac admins and power users alike can leverage much of their installation workflows to Homebrew by becoming familiar with how it works to manage packages on devices via the CLI.


Illustration: Lisa Hornung, Getty Images/iStockPhoto

Must-read developer content

Homebrew is the third-party package manager that macOS admins never knew they needed until they first deploy it to realize what they’ve been missing out on. Written on Ruby and leveraging GitHub, the lightweight package manager functions similarly to the native package manager found in Linux distributions, like apt-get to fetch installs, update apps, and add repositories where developers securely add their apps to for command-line-based management.

SEE: Top 5 programming languages for systems admins to learn (free PDF) (TechRepublic)

From the initial installation process, admins get the distinct feeling of just how simple management though Homebrew can be with its single command-line execution that gets the ball rolling. From there, invoking the man brew command displays the syntax used in conjunction with Homebrew management. New users should definitely review this to acquaint themselves with some basic commands before continuing further.

What’s the difference between formula, taps, bottle, casks, kegs, and cellar?

In keeping with the beer theme, Homebrew uses a series of syntax based on the established theme, each with its own unique meaning.

  • Formula: This defines the package to be installed and is written in Ruby.
  • Keg: This is the installation prefix of a Formula (source).
  • Cellar: The Cellar is the default location where all Kegs are installed.
  • Taps: Refers to the third-party Git repository of a Formula (app).
  • Bottle: Similar to a Keg, except already pre-compiled.
  • Cask: This is an extension of Homebrew used to install binary apps.

SEE: How to install the Homebrew package manager for macOS with one command (TechRepublic)

I’m familiar with the terminology, where do I start with Homebrew?

As with any app, after installing Homebrew you should update it (and the formulae): 

brew update 

With the app itself up-to-date, find out what apps are outdated:

brew outdated 

To upgrade all outdated apps:

brew upgrade 

If there are certain versions on an app you wish to keep and not update/upgrade:

brew pin 

In the event that an app utilizes a pinned app as a dependency, Homebrew will not upgrade the non-pinned app as it never compiles applications using outdated code. To resolve this, the pinned app must be first unpinned:

brew unpin  

Why was an app I was using no longer available or disabled?

Developers may delete or disable a formula (app) for any number of reasons. From it is no longer supported to unresolved issues. There are a few ways to check for this to obtain information as to why this occurred.

brew log  

Can additional repositories be added in Homebrew?

Yes! By searching GitHub, admins can find applications that are not part of the core repo. To add a new repository:

brew tap  

Repositories may also exist outside of GitHub, such as private repos. To add a non-GitHub-hosted repository:

brew tap   

To remove a specific tap from the repository list:

brew untap 

How do I manage installing or uninstalling applications in Homebrew?

To list all installed formulae:

brew list 

To obtain information about a formula:

brew info 

To install a formula: 

brew install 

To uninstall a formula:

brew uninstall 

Also see