How to install packages and programs on macOS with Homebrew
Package Manager makes it easy to install and manage packages and applications on macOS.
What is Homebrew?
Homebrew is an open source package manager written in Ruby by Max Howell in 2009.
Like other package managers such as:
Homebrew allows you to install, update and remove packages and applications via the macOS terminal.
How to install Homebrew on macOS
Installing Homebrew is quick and easy.
Follow the steps below to set up Homebrew on your macOS:
**Open Terminal: You can find Terminal in
Applications > Utilities > Terminal.
Install Homebrew: In the Terminal you have opened, run the following command:
/bin/bash -c \
"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
During installation you may be asked for your user password.
During installation, no errors should be returned to the terminal.
To confirm the installation, you can run the command:
If everything went well, you will see the version of Homebrew that is installed on your operating system.
Installing packages (formulae)
Now that Homebrew is installed, you can start using its features to install new packages.
For example, we can use the
search command to search for the versions of the Python programming language that are available:
brew search firstname.lastname@example.org
You can also search for packages visually on the website:
After locating the package, simply install it with the command:
brew install email@example.com
If you have searched for the command on the website, the installation command will be displayed on the website interface itself:
Installing applications (cask)
To install applications in Homebrew we must use the
For example, to install the web browser Firefox on macOS we must use `search` to check if the package exists or even its versions:
brew search --cask firefox
Yes, you can also do the consultation via the website:
After locating the desired version, simply run it in the terminal:
brew install --cask firefox
If you have searched the Homebrew cask website, the installation command will be displayed in the website interface:
Update installed packages and applications:
brew update && brew upgrade
Update a particular package:
brew update package-name
Remove a given package:
brew uninstall package-name
brew remove package-name
Update a particular application:
brew update application-name
Remove a given application:
brew uninstall application-name
brew remove application-name
Homebrew is a powerful tool that simplifies the installation and management of packages on macOS.
Its ability to easily install additional software makes it a valuable addition to the macOS ecosystem, allowing you to explore and use various tools with ease.
Now that you know Homebrew and have learned how to install it on macOS, take the opportunity to explore the wide variety of packages available and take your experience of using Apple's operating system to the next level.