Using Homebrew for macOS

Daniel Padua Ferreira
Daniel Padua Blog
2 min readJun 11, 2019

--

Intro

MacOS is an operational system based on Unix kernel, and despite Apple provides an AppStore like some sort of package manager, it lacks a lot of important stuff, specially if you are an advanced user or a developer. With this in mind, community created the Homebrew or just brew project, which is a command line package manager that owns a organised and very extensive repository of packages and apps (casks), and is widely used by Mac users.

In this guide I'll show how to install Homebrew and also some basic commands to install, remove and update packages and apps.

Requirements

Installing

With all requirements installed, brew installation is really easy. Brew is a ruby based project, so, just open your favorite terminal and execute the following command:

Usage

With Homebrew installed in your machine, open the terminal and start using brew. Use the quick reference below to manipulate packages:

Search for packages and casks

List installed packages

Install package

Remove package

Update package

or to update all your packages (including homebrew itself)

Obtaining installed package information

Homebrew also has an extension named "cask". Its goal is to provide the same experience of brew core, but for the installation of Mac desktop apps. The usage is quite similar to the previous commands:

Install cask

List all installed casks

Remove cask

Update cask

or to update all your casks

Obtaining installed cask information

Other thing that is worth a lot mentioning is the ability to manage daemons directly from brew, without using the native launchctl.

List executing services

Execute service

Stop service

Restart service

Conclusion

Homebrew eases the life of macOS users and specially those who are developers. As brew is a very mature and extensive software there may be other abilities not mentioned here in case you want to go deeper. Use the documentation for more information.

See you soon!

If you found this post useful and would like to support me, you can do so by buying me a coffee using the button above!

Originally published at https://blog.danielpadua.dev on May 5, 2019.

--

--

Daniel Padua Ferreira
Daniel Padua Blog

Microsoft Certified Professional (MCP), Certified Tester Foundation Level (CTFL), Software Engineer, Technology and Cryptocurrencies enthusiast