The Ops Community ⚙️

Cover image for Managing packages on macOS with Homebrew
Andrew Owen
Andrew Owen

Posted on

Managing packages on macOS with Homebrew

This article originally appeared on my personal dev blog: Byte High, No Limit.

If you're a Linux user, or you read my post on Scoop, you'll be familiar with package managers. They aim to simplify installing, upgrading, configuring and removing software. A key feature is dependency management: if a package requires software that isn't already installed, the package manager can install it.

Apple's solution to managing installed software on macOS, and its other operating systems, is the App Store application. Typically, end-user applications don't have dependencies. However, command line tools often do, particularly if they originated on Linux. Another issue is that macOS typically ships with older versions of common tools, if it includes them at all.

The most popular third-party package manager on macOS used to be MacPorts, and it's still a valid choice. But it has been replaced in popularity by Homebrew, which is based on Git and Ruby.

If you haven't already installed the Xcode command line tools, you might want to do that first. From the command line, enter: xcode-select --install.

To install Homebrew, open the Terminal and enter /bin/bash -c "$(curl -fsSL".

To update the package list, enter brew update. To upgrade all packages, enter brew upgrade. Now you're ready to add whatever packages you like.

Homebrew includes an extension called Cask. You install command line apps with brew install <app name>. For graphical apps use brew casks install <app name>.

Having been using an M1 (ARM CPU) Mac for over a year now, I'm pleased to report that I haven't run into any problems with Homebrew.

Top comments (0)