How to get started with Homebrew Package Manager for macOS


Mac administrators and power users can take advantage of much of their installation workflow to Homebrew by familiarizing themselves with how it works to manage packages on devices through 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 deployed it to achieve what they missed. Written on Ruby and taking advantage of GitHub, the lightweight package manager works the same as the native package manager found in Linux distributions, like apt-get for fetching installations, updating applications, and adding repositories where developers securely add their applications to command line management.

SEE: Top 5 Programming Languages ​​For System Administrators To Learn (Free PDF) (TechRepublic)

Right from the initial setup process, admins get a distinct sense of how easy it is to manage Homebrew with its unique 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 familiarize themselves with some basic commands before proceeding.

What is the difference between the formula, the taps, the bottle, the barrels, the barrels and the cellar?

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

  • Formula: This defines the package to install and is written in Ruby.
  • Keg: This is the installation prefix of a Formula (source).
  • Cellar: The cellar is the default location where all the barrels are installed.
  • Taps: refers to the third-party Git repository of a formula (application).
  • Bottle: Similar to a Keg, except that it is already pre-compiled.
  • Was: This is an extension of Homebrew used to install binary applications.

SEE: How to install Homebrew Package Manager for macOS with a single command (TechRepublic)

I know the terminology, where do I start with Homebrew?

As with any app, after installing Homebrew you need to update it (along with the formulas):

brew update 

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

brew outdated 

To upgrade all obsolete applications:

brew upgrade 

If there are certain versions of an app that you want to keep and not update / upgrade:

brew pin

In the event that an app uses a pinned app as a dependency, Homebrew will not upgrade the unpinned app because it never compiles apps using outdated code. To resolve this issue, the pinned app must first be unpinned:

brew unpin

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

Developers can remove or disable a formula (application) for a number of reasons. From this is no longer supported to unresolved issues. There are several ways to check this to get information on why it happened.

brew log

Can additional repositories be added in Homebrew?

Yes! By searching for GitHub, admins can find apps that are not part of the main repository. To add a new repository:

brew tap

Repositories can also exist outside of GitHub, such as private repositories. To add an unhosted repository on GitHub:

brew tap

To remove a specific tap from the list of repositories:

brew untap

How to manage the installation or uninstallation of applications in Homebrew?

To list all the installed formulas:

brew list 

To obtain information on a formula:

brew info

To install a plan:

brew install

To uninstall a plan:

brew uninstall

Also look


Comments are closed.