Reinstall Mac El Capitan


Installing Homebrew on Mac OS X prior to El Capitan (that is Yosemite, Mavericks and others) used to be a breeze. But with a new change in OS X El Capitan called SIP - installing Homebrew has become a bit complicated.

You need not worry, I have got you covered.

There are two parts to this tutorial. If you want to uninstall or delete Homebrew first and then re-install it on El Capitan then follow Part 2 of this tutorial below. However, if you are doing a fresh installation of El Capitan then follow the steps outlined in Part 1 of this tutorial.

Happy Brewing!

Part 1: How to install fresh copy of Homebrew in OS X El Capitan

Step 1 - Install XCode by downloading it from here. This is needed for installing the XCode command line tools which in turn is needed by Homebrew. You might skip this step if you already have XCode installed.

Reinstall Mac El Capitan

Quick Note - If you already have XCode installed then go to STep 2. Also, You can skip this step and jump to Step 3 instead and see if the Homebrew installer complains about XCode command line tools. If it does, then come back to this step and continue.

Step 2 - Install Command Line tools by running the following command in terminal:

Step 3 - Now, you need to get a fresh copy of Homebrew and then run the install script. You can perform both these tasks using this one command in the terminal app:

If it complains about permission issues, then you have to fix it before you can continue. This is an additional thing that you need to do in Mac OS X El Capitan because Apple introduced this new feature called System Integrity Protector. Here is a guide to how you can fix this permission issue with Homebrew on OS X El Capitan.

After you have fixed the permission issue, re-run the command above in the terminal to begin the Homebrew installation process.

  1. Jun 07, 2017 Apple recommends the Command-Option-R option as the only safe way to reinstall a Mac with El Capitan or earlier versions of macOS if you want to be sure your Apple ID doesn’t persist even after.
  2. Now we are going to install Mac OS X El Capitan. Select Reinstall OS X in the Recovery Mode. Click Continue when the OS X installer comes up. It will ask to select Agree or Disagree few times. Click on Agree or Continue on all selections. When the installing process is done, you need to configure settings.

Step 4 - Run the Brew Doctor utility to check for issues or warnings in the terminal

The latest software makes your Mac device compatible with the new technological developments. Still, it also makes the existing OS obsolete. That's why most Mac users with old devices try to update their Mac to OS X El Capitan. However, you can't update your Mac to El Capitan 10.11 if your Mac runs on software later than Mac OS X 10.6 Snow Leopard.

brew doctor

If it shows errors, then you need to fix them before you can continue. You might, however, skip any warnings that the doctor tool shows.

All the apps and libraries that you install using Homebrew are located in this folder: /usr/local/Cellar

After Homebrew is installed, you can use some of the following commands to perform different tasks with it:

Reinstall Mac El Capitan 10 11

Reinstall Mac El Capitan
  1. You can search for an application using: brew search
  2. You can install a new application using: brew install <application-name>
  3. In order to list all apps installed by Homebrew, you can use: brew list
  4. For removing an app installed via Homebrew: brew remove <application-name>
  5. Homebrew can be updated using: brew update
  6. man brew will show other switches and command options for Homebrew.

Part 2: How to uninstall and re-install Homebrew in OS X El Capitan

Step 1 - First you will have to delete the Cellar folder of Homebrew that is usually available in the /usr/local folder. To do this, you need to run the following command in the terminal:

rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup

Please note - If the above command throws a permissions error then you need to read this article to fix the Homebrew permissions in OS X El Capitan.

Reinstall Mac Mail El Capitan

Step 2 - Install Xcode & XCode command line tools. This is an optional step but for many users, installing the tools mentioned in this step is mandatory. So in order to check, if you have to really perform this step, what you can do is quickly skip to Step 3 and run the command mentioned on that step - if you see success then you can safely skip this step, else continue here:

First download and install Xcode from this link - https://itunes.apple.com/au/app/xcode/id497799835?mt=12

Next, install Xcode command line tools by running the following command in your terminal:

If it complains about permissions, then use sudo and run the same command again.

Mac El Capitan Problems

Step 3 - Now that you have a cleaned-up Brew data folder, you need to fetch a fresh copy of Homebrew and start the installation process by running this command in the terminal:

Reinstall mac os x el capitan

You might be prompted for your root password and when that happens, enter the password and continue. You can find some sample output towards the end of this post.

Step 4 - After the installation completes, you should run the doctor utility on brew to see if there were any issues with the Homebrew installation. This can be done by running the following command:

brew doctor

If it returns any error, try fixing them. If you see just warnings then you could ignore them.

At this point you have succesfully installed Homebrew on El Capitan and you can use the commands mentioned above to perform various operations.

Some sample Outputs:


Rachel is trying to sell her Mac, but…

My friend was wiping my Mac so I could sell it and I’m pretty sure they’ve deleted the start up disk? It’s not letting me reinstall the OS on a recovery startup.

She wonders about a fix. There are a couple of options with an erased partition.

Because Recovery didn’t work, the fastest way to install fresh is to make or borrow a macOS installer on a USB flash drive or a disk drive. We have instructions for making a bootable installer with macOS Sierra (as well as archived versions for several previous releases). You need at least an 8GB flash drive. The article includes instructions on obtaining the installer, which might involve you having to use someone’s else Mac to download it, if you don’t have a replacement Mac on hand yet.

But if you can’t get access to another Mac or the necessary drive, it’s still possible to use a different Recovery mode on all recent Macs, dating back to 2010. Normally, you can start up a Mac while holding down Command-R to boot into what Apple now calls macOS Recovery. That allows you to run Disk Utility, reinstall or wipe and install the system, access Terminal for command-line functions, and so on. In that mode, when you choose to reinstall without erasing the drive, my recollection is that Recovery looks for the current OS system installer on your startup disk in the Applications folder, and uses that. (Apple doesn’t document that, and I haven’t had to test that for years.)

Reinstall Mac Os X El Capitan

Failing finding it, Recovery downloads the currently installed version of macOS (or OS X), which is about 5GB. When complete, it installs it and reboots, and places the installer in the Applications folder.

However, there’s yet another option: macOS Recovery over the Internet, which requires either a Mac model released in 2012 or later, or most 2010 and 2011 models with a firmware upgrade applied. There, the Mac reaches out over a Wi-Fi or ethernet connection to download the relatively modest Recovery software, which then bootstraps the download of the full macOS installer.

Apple says Internet-based Recovery should happen automatically on supported models, and you should see a spinning globe when that mode is invoked while the download occurs. However, if you have normal Recovery installed and it refuses to install macOS for some reason, you can manually invoke Internet Recovery.

While Command-R at startup always installs whatever the most recent version you installed on your Mac, holding down Command-Option-R brings down the very latest compatible version that can be installed. Apple also offers Shift-Command-Option-R, which installs the version of OS X or macOS with which your computer shipped, or the next oldest compatible system still available for download.

(Apple just changed this behavior with 10.12.4, but if you’re using Internet Recovery for a clean install on an erased drive, the new behavior should be active as it will be pulled from the version of Recovery that’s bootstrapped from Apple’s servers. The pre-10.12.4 option is simply Command-Option-R, but it acts like the new Shift-Command-Option-R, installing the shipped OS or the oldest compatible version.)

Apple recommends the Command-Option-R option as the only safe way to reinstall a Mac with El Capitan or earlier versions of macOS if you want to be sure your Apple ID doesn’t persist even after erasure.

Ask Mac 911

We’ve compiled a list of the questions we get asked most frequently along with answers and links to columns: read our super FAQ to see if your question is covered. If not, we’re always looking for new problems to solve! Email yours to [email protected] including screen captures as appropriate. Mac 911 can’t reply to—nor publish an answer to—every question, and we don’t provide direct troubleshooting advice.

Latest Posts