Homebrew is a popular open-source package manager, primarily used on macOS (but also on Linux).
Here we will spell out the basics of package managers and share details about Homebrew in particular.
A package is software that you can install, remove, and upgrade on your system.
Package managers, broadly-speaking, fall into two categories:
Homebrew is a system package manager for macOS. This means it's a tool that you can use to install all of the software that you need on your Mac, whether that's command line tools (e.g. curl
, wget
), desktop applications (e.g. Google Chrome, 1Password), or developer dependencies (e.g. the PostgreSQL or MySQL databases).
brew
- the executable used to run Homebrew (or Workbrew).Homebrew’s formulae allow many users to install the same software in a standardized way. Homebrew/homebrew-core (and some other taps) provide “bottles”, pre-compiled binaries, which means users don’t have to wait for a potentially lengthy build from source-code on their machine.
One key benefit of Homebrew is its curation. To be included or updated in Homebrew’s official package Taps (Homebrew/homebrew-core or Homebrew/homebrew-cask) there is a minimum standard and a human review process. This is similar to the approach used by Ubuntu’s main repositories or the Apple App Store. In contrast, package managers like NPM allow anyone to publish or update a package without any human review.
Homebrew is a “rolling release package manager”, which means that the Homebrew maintainers keep all packages in official repositories as up-to-date as possible at all times. This is in contrast to other package managers that maintain a specific version of a package and support it for a longer periods of time. When a user runs brew upgrade
Homebrew will replace the older version on your machine with the newer version.
Some packages have no “dependencies”, meaning you can install one package and you’re done. Other packages will have dependencies. For example, CMake is freestanding, but many, many packages depend on it. If you install a package that requires CMake, Homebrew will automatically install it for you first.
When a new version of the package is released, you can run brew upgrade
and it will replace the version on your machine with the newer version. If you want to get rid of something, you're going to run brew uninstall
, and it will remove the package from your system, whether it's a cask or a formula.
If you want to keep install, upgrade, uninstall and view the packages installed not just on your machine but all the machines in your team, organization or company: try Workbrew today, the best way to use Homebrew at work.