April 19, 2024
How to Install Homebrew on Mac

How to Install Homebrew on Mac

Posted December 7, 2021 at 5:28am by iClarified
These are instructions on how to install Homebrew on your Mac.

Homebrew is a package manager that "installs the stuff you need that Apple (or your Linux system) didn't." It's a very useful collection of software packages, developer tools, and command line tools like node, git, wget, yarn, ffmpeg, youtube-dl, etc.


Install Homebrew on Mac


Step One


Launch the Terminal app from Applications > Utilities.How to Install Homebrew on Mac


Step Two


Enter the following command into the Terminal window to launch the Homebrew installation script.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
How to Install Homebrew on Mac

Step Three


Input your administrative user password when prompted.
How to Install Homebrew on Mac

Step Four


If you haven't already installed Xcode, Homebrew may prompt you to install Xcode Command Line Tools. You will need to do this to get Homebrew installed. Press the Return key to continue.
How to Install Homebrew on Mac

Step Five


The Homebrew installation process will now begin. This could take a few minutes.
How to Install Homebrew on Mac

Step Six


Homebrew will show you the two commands that need to be run to add the package manager to your path.
How to Install Homebrew on Mac

Execute these commands in the Terminal window.
How to Install Homebrew on Mac

How to Install Homebrew on Mac

Step Six


Congratulations, you've finished installing Homebrew! You can now search for Homebrew packages and install command line tools.

Search for package using "brew search [term]". For example, you can locate sql and related command line tools by typing "brew search sql" into your Terminal window.
How to Install Homebrew on Mac

You can install a package using "brew install [packagename]". For example, enter "brew install postgresql" to install the open source PostgreSQL database.
How to Install Homebrew on Mac

How to Install Homebrew on Mac

To keep Homebrew updated, run "brew update" periodically in Terminal.


Uninstall Homebrew


To uninstall homebrew, you can use the following command in Terminal.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"


Homebrew Terminology


● formula: Homebrew package definition built from upstream sources
● cask: Homebrew package definition that installs macOS native applications
● keg: installation destination directory of a given formula version e.g. /usr/local/Cellar/foo/0.1
● rack: directory containing one or more versioned kegs e.g. /usr/local/Cellar/foo
● keg-only: a formula is keg-only if it is not symlinked into Homebrew’s prefix (e.g. /usr/local)
● cellar: directory containing one or more named racks e.g. /usr/local/Cellar
● Caskroom: directory containing one or more named casks e.g. /usr/local/Caskroom
● external command: brew subcommand defined outside of the Homebrew/brew GitHub repository
● tap: directory (and usually Git repository) of formulae, casks and/or external commands
● bottle: pre-built keg poured into the cellar/rack instead of building from upstream sources
Add Comment
Would you like to be notified when someone replies or adds a new comment?
Yes (All Threads)
Yes (This Thread Only)
No
iClarified Icon
Notifications
Would you like to be notified when we post a new Apple news article or tutorial?
Yes
No
Comments
You must login or register to add a comment...
Recent. Read the latest Apple News.
RECENT
Tutorials. Help is here.
TUTORIALS
Where to Download macOS Monterey
Where to Download macOS Ventura
AppleTV Firmware Download Locations
Where To Download iPad Firmware Files From
Where To Download iPhone Firmware Files From
Deals. Save on Apple devices and accessories.
DEALS