In this article we're going to show you how to perform a clean install of macOS. This is often a handy option if your Mac is slow or otherwise misbehaving.
It's also something computer users often resort to when they are trying to get rid of a virus (although there is a lot of debate about whether there are viruses on the Mac).
We'll start by showing how to do this for the latest version of macOS (macOS Catalina, at time of writing), before moving on to the far tricker business of installing a clean copy of an older version of macOS (High Sierra, Sierra, El Capitan, Mojave, Yosemite or some earlier version of OS X). If that's what you're looking for, it may be worth taking a look at another article where we focus on that entirely: How to download and install old versions of OS X on a Mac.
Before you start, you need to know that there are two ways to do a clean installation of macOS. The traditional way was to make a bootable copy of the macOS installer on a Flash drive and then reformat your drive before installing the bootable copy on to your Mac. There is also an even simpler method that allows you to use macOS Recovery to reinstall the Mac operating system over the web. We have a tutoritl about doing a clean instal of macOS using recovery here.
A word of warning: If you are wanting to do a clean install of Catalina and are already running Catalina the process is different to earlier versions of macOS. You will now find two volumes to delete: Macintosh HD-Data and Macintosh HD. We'll explain what you need to do about that below.
How to clean install macOS using a bootable USB
Before you begin you'll need the following:
- A 15GB or larger removable USB flash drive to hold the installer file for our chosen version of macOS. (We're going to erase it, so make sure it doesn't contain any valuable data.)
- Admin privileges for the Mac.
- A back up, just in case something goes wrong. Full instructions here: How to back up a Mac. Alternatively, if you sync all your Documents and Desktop with iCloud you may not require a backup, but make sure that everything you need is in the cloud.
Ready? Let's get started.
Format the external drive
We're going to re-download the installer file for our chosen version of macOS and store it on a USB stick or external drive. But before you do that you can prepare the USB drive by reformatting it.
Here's how to format your USB drive:
- Plug in the USB drive.
- Go to Applications > Utilities.
- Open Disk Utility.
- Select the drive and click Erase. (The name of the disk needs to be "Untitled", if the Terminal commands below are to work, so rename it if necessary.)
- Select Mac OS Extended (Journaled) as the format type.
- If it's available choose GUID Partition Map from the Scheme options.
- Click Erase.
- Disk Utility will create the partition and set up the drive (it can take a while).
- Click Done.
Get the Catalina macOS install file
If you're reinstalling the latest version of macOS, the next step is relatively easy.
If you are currently running Mojave and want to do a clean install of macOS Catalina then you can access the installation package via System Preferences:
Open System Preferences > Software Update and download the Catalina update.
If you are already running Catalina, or if you aren't running Mojave, the best way to access the download file is via the Mac App Store. Here's a direct link.
Alternatively, open Mac App Store and search for Catalina.
- Hit Download or Get (depending on the version of the Mac App Store you are using).
- You may get a warning message at this point, telling you that this version of macOS 'is already installed on this computer. Would you like to continue?' Click Continue.
- Enter your Apple ID and password.
The installer file will be multiple GB, Mojave was 5.7GB, for example, so downloading can take a while.
When it's finished downloading the installer will launch automatically, but we don't want to use it yet so don't click to start the installation!
Press Command + Q to quit out of the installer.
Find the installer file (if will be located in your Applications folder, or you could search for it using Spotlight (command + Space and start typing Catalina).
If you just want to install Catalina, you can skip the next step, where we'll be showing how to dig up the installer file for an older version of macOS or Mac OS X.
Get the install file for an older version of macOS
For older versions of macOS and Mac OS X it's a bit harder to get the install file: Apple doesn't offer downloads of outdated OS versions through the normal store front, and searching for the name won't find what you're looking for.
We have a detailed guide to getting older versions of macOS here, but we will explain what you need to do below.
Depending on the version of macOS you are running, the installers for some versions of macOS can be found in the Purchased section of the App Store.
Log into the Mac App Store with the Apple ID you used and click Purchased in the menu bar along the top. Scan down the list of apps you've purchased or download for free (which is in order of when you downloaded them) and find the name of your chosen version: El Capitan, Yosemite or whatever. Click download.
However, there are a few reasons why this may not work for you:
- If you have already installed Mojave or Catalina on your Mac you cannot easily search for old versions of the Mac OS from the Mac App Store.
- You won't find the version of macOS your Mac shipped with in the Purchased section of the App Store.
- And you won't find versions of macOS in the purchased section if you never installed that version.
However, luckily it is still possible to get hold of some versions of macOS if you are running a newer version than Sierra.
- You can get macOS Mojave via this link.
- Download High Sierra here.
- Sierra is here.
- El Capitan can be downloaded from this link.
- Yosemite is available here.
For more advice on getting hold of even older editions of Mac OS, see How to get old versions of OS X.
Create a bootable USB disk
Next we need to create a bootable USB disk so that we can install a new copy of macOS on the Mac from the flash drive.
We've got full instructions on how to do that here - How to make a bootable MacOS install drive - but we'll run through the basics here.
We're going to create the bootable drive using Terminal, which you can open by pressing Command + Space bar and typing Terminal.
Connect the USB drive to your Mac that you formatted earlier. Make sure it's called Untitled - rename it if necessary (this will help you enter the correct text in Terminal in the next steps).
Create a bootable USB disk in Terminal
Creating a bootable installer has been pretty easy since the arrival of Mavericks in 2013. thanks to the Terminal command createinstallmedia that arrived in that version. Here's how to use it:
- Open the Terminal application on your Mac (find it by searching using Command + Space and typing Terminal)
- Now copy and paste the following text into Terminal (This text is for Catalina - we include the text needed for the other versions of macOS in this article).
sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled
- Press Return.
- Enter your password (you won't see the password appear).
- Terminal will warn that it is about to erase the drive. If you want to continue press Y and then Return. The process can take a while, you'll see “Erasing Disk: 0%… 10%… 20%… 30%…100%…
- Next Terminal will spend a few minutes copying the installer file to your drive. "Copying installer files to disk… Copy complete" and so on will appear in the Terminal window.
- When the bootable drive is prepared you will see the word Done. It can take a while.
Now you have the installer on the external drive you can use that to install multiple copies of macOS.
Install from installer drive
Now we are ready to install the copy of macOS from the installer drive on our Mac. If you want to do a fresh installation (and completely wipe your Mac) it's time to reformat your start-up drive.
Here's how to do a fresh installation of macOS if you aren't already running Catalina
- Connect your boot drive.
- Start up - or restart - your Mac while holding down the Option key (also known as Alt). This will take you to Startup Manager.
- Choose to install your chosen version of macOS from the external drive.
- Select Disk Utility.
- Select your Mac's start up disc, probably called Macintosh HD.
- Click on Erase.
- Wait for your startup disk to be formatted.
- Go back to the main Utilities menu and choose Install macOS.
- Choose your startup drive as the location to install macOS.
Once installation is complete, you can restore apps and settings from your backup, or download them again manually.
Remember that you won't want to recover a Time Machine backup if you don't want to copy over all the setting and preferences associated with your old system.
How to erase your drive in Catalina
Note: if you are already running macOS Catalina you will have two volumes: Macintosh HD and Macintosh HD - Data. If you want to do a clean install of Catalina over an existing installation of Catalina you will need to first delete the Macintosh HD - Data volume. We cover how to do this in more detail here: How to reset and wipe a Mac.
Macintosh HD - Data in Catalina is where your data is stored separately to the macOS installation.
- Either click on the - button or go to the menu and choose Edit > Delete APFS volume.
- You will see a message warning you that this will permanently erase your data. Click on Delete. Do not choose Delete Volume Group.
- Wait while the volume is deleted.
Then you can move onto deleting your Macintosh HD volume as above.