DEV Community

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

Posted on • Edited on

1 1

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 https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)".

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.

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more