- Xcode and CLT are not already installed Homebrew will download and install the Command Line Tools during Homebrew installation.
- You are using the latest macOS and Xcode is installed, the correct CLT is already installed.
- You are using a macOS prior to the latest release and Xcode is installed you may have the wrong CLT. That's because when Apple upgrades Xcode, only the latest release of macOS CLT are usually supplied. If macOS is not the latest release, the CLT may not match. Homebrew will determine if the correct Command Line Tools are already installed. If not, it will download and install them during Homebrew installation.
Install the Homebrew Package Manager and Prerequisites
The Homebrew package manager and prerequisites takes several minutes to install.
sudo rm -r /usr/local/*
For OS X 10.11 and 10.12: NEVER delete the /usr/local directory! It's very difficult to recreate, it must be restored from a backup. This is due to System Integrity Protection (aka rootless) security.