HomeAbout MeContact

Using Homebrew for macOS

By Daniel Padua
Published in Tips
May 05, 2019
1 min read
Using Homebrew for macOS

Learn how to install and the essential to get by with Homebrew for macOS

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

  • Intel 64 bits processor

  • macOS 10.12 or higher

  • Command Line Tools (CLT) for Xcode (install it via AppStore or https://developer.apple.com/downloads)

  • A shell installation: default terminal (bash), ksh or zsh

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:

/usr/bin/ruby -e$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)

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

brew search ${package_or_cask_approximate_name}

List installed packages

brew list

Install package

brew install ${package_name}

Remove package

brew remove ${package_name}

Update package

brew upgrade ${package_name}

or to update all your packages (including homebrew itself)

brew upgrade

Obtaining installed package information

brew info ${package_name}

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

brew install ${cask_name} --cask

List all installed casks

brew list --cask

Remove cask

brew remove ${cask_name} --cask

Update cask

brew upgrade ${cask_name} --cask

or to update all your casks

brew upgrade --cask

Obtaining installed cask information

brew info ${cask_name} --cask

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

brew services list

Execute service

brew services run ${service_name}

Stop service

brew services stop ${service_name}

Restart service

brew services restart ${service_name}

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!


Tags

#homebrew#macos#apple

Share


Previous Article
Java Spring Boot + Vscode
Daniel Padua

Daniel Padua

Software Developer

Topics

Cloud
Concepts
Programming
Tips

Related Posts

Using Chocolatey for Windows
May 05, 2019
1 min
© 2025, All Rights Reserved.
Powered By

Quick Links

About MeContact

Social Media