Deauthorise your iTunes account
You should deauthorise your computer from the iTunes Store. This means it will no longer be linked to your iTunes account. (This is important because you can only use up to five Macs to play music and movies that are locked to your iTunes account.)
The precise method of deauthorising iTunes varies depending on which version you've got.
If you're running macOS Catalina, iTunes no longer exists as a standalone app, so you will instead access the iTunes Store via the new Music app.
Open the Music app, and select Music > Preferences from the menu bar. Now go to the General tab and select iTunes Store. From here you can access your account and choose to deauthorise this computer.
If you're running a Mac that has iTunes 12, you'll need to open iTunes and click Account > Authorisations > De-authorise This Computer. Enter your Apple ID and password and click De-authorise.
iTunes 11 and earlier
In older versions (below) you'll need to click Store > Deauthorise This Computer.
Turn off FileVault
FileVault encrypts the files on your hard drive. It's not on by default, but if it is being used then it's advisable to turn it off before going any further (you'll be wiping the files soon, so security shouldn't be a concern).
1. To turn off FileVault, start by opening System Preferences.
2. Click on Security & Privacy.
3. Then select the FileVault tab.
4. Check that it says 'FileVault is turned off for the disc [name of main hard drive]'. If it's off you don't need to do anything.
5. If if is turned on then you should click on the padlock icon in the bottom left, enter your user name and password and click on Unlock.
6. Now click Turn Off FileVault.
7. You will need to enter your user name and password again and you may need to wait while decryption takes place.
The next step is to turn off iCloud. Before you start, if you have any iCloud files that were created on that Mac they will be archived into your home folder (so remember to copy them to your backup).
1. Open System Preferences and click on iCloud.
2. Tap on Sign Out.
3. To remove all your personal data, untick the boxes beside iCloud Drive, Contacts, Calendars and Reminders. Then click Continue. (Or click 'Delete From Mac' on each popup if you're using an earlier version of macOS.)
4. You may see a warning that iCloud Drive needs to finish updating before continuing with sign out.
5. If you've got a MacBook Pro or MacBook Air with Touch ID you will need to confirm that your payment details should be removed from the Mac. Signing out will remove any Apple Pay information.
6. Next you will be required to enter your Apple ID password.
Now you just need to wait while iCloud does its stuff.
Restart your Mac in Recovery Mode
Now you have backed everything up, and shut off your iCloud connections, you are ready to wipe the Mac.
1. To enter Recovery Mode, click the Apple logo at the top left of the screen and select Restart.
2. Immediately hold down the Command and R keys until you see an Apple logo or spinning globe. (You may be better off using a different key combination depending on the age of your Mac, and which macOS you want installed or was installed on the Mac when you bought it - we have a complete guide to starting a Mac in Recovery Mode here). For example, Apple recommends that "if you're selling or giving away a Mac that is using OS X El Capitan or earlier, use Option-Command-R to make sure that the installation isn't associated with your Apple ID".
3. Expect it to take a while for the Mac to start up in this mode.
4. You may see a screen asking you to choose a language.
5. The next screen you'll see is the Recovery Mode Utilities window. Since macOS Sierra and later it has looks something like this:
If you're having problems because Command + R isn't doing the trick, read this: How to reinstall macOS if Recovery won't work.
Erase your Mac's drive and reformat your Mac
Now you're ready to erase your drive.
This is where things will look a little different if you are using macOS Catalina compared to how they looked before.
We'll run through the method in Catalina first before moving onto Mojave or previous versions of macOS below that.
How to delete your Mac in Catalina
When Apple introduced macOS Catalina in 2019 it added a new read-only volume where the operating system lives. This volume is Macintosh HD (yours may have a different name). Alongside it you will also have a Macintosh HD - Data volume. This is where your data resides. The reason Apple separated the two volumes in Catalina is to ensure that critical operating system data can't be overwritten - but it means that if you want to make sure all traces of your data are removed from your Mac before selling it on, or because you want to do a clean install, you will need to wipe both volumes.
When you are reformatting your Mac in Catalina you first need to delete the Macintosh HD - Data volume before deleting Macintosh HD. You do need to delete both, you can't cut corners.
1. As per the step above, start up your Mac in Recovery by holding down Command + R as the Mac boots up.
2. Once Recovery starts up choose Disk Utility.
3. You should see two disks - Macintosh HD and Macintosh HD - data (shown below - sorry about image quality!) This new data drive in Catalina is where your data is stored separately to the macOS installation.(It's possible your drive is called something else, like Home HD for example).
4. Click on this Macintosh HD - Data drive to select it.
5. Either click on the - button or go to the menu and choose Edit > Delete APFS volume.
6. You will see a message warning you that this will permanently erase your data. Click on Delete. Do not choose Delete Volume Group.
7. Wait while the volume is deleted.
8. Now you need to go back to Disk Utility to delete the Macintosh HD. You have to do both steps as you won't just be able to reinstall macOS over the top of macOS. And you will need to reinstall the macOS in order to recreate the Macintosh HD-Data volume. Click on Macintosh HD to select it.
9. We recommend that you click Unmount. Initially when we tried to delete Macintosh HD we saw an error message that stated: Erase process has failed because volume Macintosh HD on disk 2s5 couldn't be unmounted because it is in use by process 793 (kextcache). Unmounting first fixed this problem.
10. With Macintosh HD still selected click on Erase.
11. Enter a name you want to give the drive once you have reformatted it, such as Macintosh HD.
12. Choose the format. This is will be APFS if you are using Catalina - older OSs might have had the option of Mac OS Extended (Journaled).
13. Click Erase and enter your Apple ID if required. Wait.
14. Now quit Disk Utility to return to the MacOS Utilities screen.
The next step involves reinstalling macOS. We'll discuss how to do that in the section below.
How to delete your Mac in Mojave or earlier
The process for deleting and reformatting your Mac is slightly less complicated in macOS Mojave or earlier as there isn't the second Data volume to delete first.
As above, start up in Recovery.
1. Select Disk Utility from the options, and click Continue.
2. Click on your main hard drive, typically called Macintosh HD, in the sidebar on the left. You're looking for the disk name, not the volume name indented underneath it if that appears.
3. To wipe your hard drive, click the Erase button, then click Erase. Note that this permanently erases all data on the hard drive so don't do this unless you've cloned the drive or are happy to never access anything on that drive again.
4. When it's finished, exit the program by going to the top menu and selecting Disk Utility > Quit Disk Utility.
You can't just sell your Mac having erased the contents - if you do the new user will be confronted with a flashing question mark when they start up the Mac because there will be no operating system installed. You need to reinstall macOS before you can sell it on.
Alternatively, if you are planning to continue to use the Mac and just wanted to do a clean install you will want to install a version of macOS.
You should still be in macOS Utilities.
1. Choose Reinstall macOS from Utilities and follow the instructions that appear to reinstall macOS.
2. Your Mac will start to download and install Catalina (or which ever version of macOS your Mac was running - if you wanted to install an older version of macOS we have more information below, or you could read this).
3. Eventually after the longest-ever 49 mins or so your Mac will restart. But the wait isn’t over. It will still take a little time while you start up and watch the white bar. Ours said 11 minutes remaining around that time, but it took a lot longer than that. Just leave your Mac to get on with it and ignore any time remaining indicators.
4. Finally you will see the Welcome screen. If you are selling or passing on your Mac you can leave it at this stage because the new user will need to input their details. If you want to continue to use the Mac then follow the steps to set it up.