If you aren’t happy with the selection of software on the Mac App Store, Homebrew might be a good solution for you. I wouldn’t be surprised if you aren’t completely pleased with what you can find in Cupertino’s walled garden of apps, since open-source titles aren’t usually available there. With Homebrew, you get quick access to almost the entire open-source software world. This is also a nice alternative to John Martellaro’s method of upgrading to Python 3, by the way, since updates are much easier with Homebrew.
A Word on Package Managers
Most Linux distributions have their own package managers, like apt (for Debian-based distrubitions), portage (Gentoo), or RPM (Red Hat and Fedora). For years, there’s been an equivalent on macOS, but I’ve found that quite a few folks don’t know about it.
A package manager helps you install software, sometimes from source code and sometimes with already-compiled binaries. Much of this software will consist of useful command line tools, but there are plenty of graphical apps available through package managers. What’s great is that almost, if not all, of it is open-source software.
Homebrew, the Most Popular Package Manager for macOS
When I say “most popular,” that isn’t saying much. The sad fact is, the majority of the Mac users I talk to don’t know anything about Homebrew. That’s unfortunate, because with Homebrew and its add-on, Cask, you can kiss the days of dragging and dropping applications goodbye.
Homebrew provides an easy way to install Mac Terminal utilities and other graphical apps, and this vast library of software is, by and large, both open-source and free. Let’s look at how you can get started.
Installing Homebrew on Your Mac
If you don’t already have Xcode installed, you’ll need some of its components. Don’t rush out to download that huge app, though. All we need are Xcode’s command-line tools, which you can install with this Terminal command:
Once finished, and it might ask for your administrator password, you’ll be ready to install Homebrew. Just issue this command from Terminal, and away you go.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Once that script runs its course, you should check to make sure Homebrew is installed and working properly. Do that as follows:
Installing Cask for Easier Open-Source Software Management
Good news, you don’t have to do anything special to get Homebrew Cask! The utility comes right along with the base install, so you can move right into installing apps. You should start by reading these tips on Homebrew and Homebrew Cask.
- Don’t run brew, the executable for Homebrew, as root or under sudo. If/when it needs administrative privileges, brew will ask for your sudo password.
- The most important brew commands are search, install, and remove. These allow you to search for, install, and later remove apps as needed.
- Know that many open-source apps are available through Homebrew. These include Google Chrome, VLC, Handbrake, Adium and others.
- From Terminal, brew is for command-line apps and tools. On the other hand, brew cask is your source for GUI macOS applications. It searches out binaries, so you don’t have to compile.
- The command brew upgrade will find which of your Homebrew-installed apps are outdated and need to be upgraded to the latest version.
Not everything in the open-source community will be available through Homebrew or Homebrew Cask, but quite a bit is. For even more information, be sure to check out the Homebrew Cask Usage Guide or the Homebrew brew command manual.
Should you decide you don’t want Homebrew on your Mac anymore (can’t imagine why, but someone asked), here’s the command to make it go away:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"