Homebrew: macOS Package Manager
Introducing Homebrew – the MacOS package manager
A package manager makes it easy to install and update applications on your Macintosh. There are at least nine package managers for the Macintosh. There are the old-timers, Fink and Macports, the relatively new Nix, but my favorite is Homebrew. h[ttps://brew.sh]()
If you saw our last two episodes, you’re ready to install and use brew. Brew is a command-line utility. You’ll use terminal to install it and to run its commands, even though many of the programs it can install are standard Mac GUI apps.
Let’s start by installing brew. Here’s the command:
`/bin/bash -c “$(curl -fsSL )”`
(Save yourself some typing by copying this command from the Brew web page and pasting it into a terminal.)
Because may of the tools brew installs are built from source code, you’ll need Apple’s free Xcode installed and the Xcode command line tools.
Now you can install any of hundreds of pre-built “formula” for virtually any UNIX tool.
using the command
`brew install (package)`
You can remove it using the uninstall command
`brew uninstall (package)`
Verifies that brew is properly installed and working.
One of the benefits of brew is that it installs everything in its own directory then puts a shortcut in the /usr/local directory, where it won’t conflict with Apple installed programs. Many of the UNIX tools Apple bundles with macOS are older and out-of-date. Brew will install the latest version of the program without replacing Apple’s pre-installed program, so nothing breaks. It’s easy to remove any brew package without disrupting macOS.
There are a few other commands that are useful to know.
Mac GUI apps are available with the’brew cask install` command. For example `brew cask install firefox`
`brew list` will show you all the brew packages you’ve installed.
To find a package in the brew database use the `brew search` command
`brew upgrade` will update all the packages you’ve installed. You’ll want to run that from time to time to make sure everything is up-to-date.
My Mac has dozens of brew packages installed. A few goodies include:
my favorite shell`fish`
To learn more about brew type man brew
Next week, using brew and something called brewfile to set up a new mac from scratch.
Also, for next week, install `mas`. It’s an easy way to install and update apps from the Mac App Store.
Leo Laporte gives you helpful tips to get the most from your Mac every week on Hands-On Mac.
Products we recommend:
Join our TWiT Community on Discourse:
TWiT.tv is a technology podcasting network located in the San Francisco Bay Area with the #1 ranked technology podcast This Week in Tech hosted by Leo Laporte. Every week we produce over 30 hours of content on a variety of programs including Tech News Weekly, MacBreak Weekly, This Week in Google, Windows Weekly, Security Now, All About Android, and more.