If you're planning to sell your old Mac, passing it on to a family member or friend, or trying to fix issues with your software that require a fresh installation of the Mac operating system, you'll first need to reset your Mac to factory settings. Read on to find out how to completely wipe a Mac.

Fortunately it's easy to remove all the data and content from a Mac before you sell it on, and it's very important that you do so if you don't want to leave yourself open to identity theft. Just remember that if you're passing on an old Mac, removing personal information alone isn't enough - you also need to make sure there's a working version of macOS installed after the wiping is complete for the next owner to use.

Our guide to wiping all your data from a Mac enables you to reset your machine to an unblemished factory state, as if it was fresh out of the box, with a clean and working install of macOS. If you've forgotten the password, you may wish to read How to reset a Mac without the password instead. (Or read our guide to deleting or resetting an iPhone or iPad if you want to wipe one of those devices.)

In brief, here is how to reset your Mac. Further detail is given below and linked from each step.

  1. Make sure you're connected to the internet so you can download the latest copy of the Mac operating system able to run on your machine. This is likely to be macOS High Sierra, but an older Mac may need an older version of Mac OS X (we explain how to obtain one here).
  2. Either back up your Mac using Time Machine or clone your internal hard drive to an external drive, using an app like SuperDuper or Carbon Copy Cloner. This enables you to access all your old files, and the drive can be re-cloned to the internal drive if you want to restore your Mac. Read more about this step here.
  3. Deauthorise your iTunes store account. (You should also deauthorise any third-party apps, such as Photoshop, that are locked to your Mac.) Read more about this step here.
  4. Sign out of and disable iCloud. Read more about this step here.
  5. Restart the Mac in Recovery Mode. Hold down Command and the R key during restart - or use alternative key combination as appropriate (We have a detailed tutorial on using Recovery Mode here).
  6. Use Disk Utility to erase the hard drive. Click on Disk Utility > Continue. Select the main volume and click Unmount then Erase). Quit Disk Utility (Disk Utility > Quit Disk Utility). Read more about this step here.
  7. Click on Reinstall macOS or Reinstall macOS and Continue. Follow the instructions to reinstall macOS. Read more about this step here.

Clone or backup your Mac hard drive

The process of resetting a Mac or MacBook to factory settings gets rid of all your data stored on that machine. Obviously, before wiping your Mac you should copy the data from your old Mac to a new one. This can be done simply using Time Machine - we explain how to back up using Time Machine here and how to move your data to a new Mac using Time Machine here.

It's also worth making a clone of the whole hard drive and keeping it around for a while, just in case.

The best way to do this is using a program like Carbon Copy Cloner or SuperDuper (both are available as free trials) along with an external hard drive. Choose your main hard drive in the source, and your external hard drive in the Destination. Now click on Clone.

How to reset Mac to factory settings: Carbon Copy Cloner

You should be able to boot from the cloned external hard drive. To test this, reset your Mac and hold down the Option/Alt key when you boot up your Mac. Use the arrow keys on your Mac to select the external drive and tap Enter. We have more information about running your Mac from an external drive here.

This cloned drive can be re-cloned back to the main drive if you decide to restore your Mac, or it can be used to access all the original files from your computer after you have wiped the internal hard drive.

Deauthorise iTunes

You should deauthorise your computer from iTunes. This means it will no longer be linked to your iTunes account. You can only use up to five Macs to play music and movies that are locked to your iTunes account, so you shouldn't pass that on to another person.

How to deauthorise iTunes on Mac

The precise method of deauthorising iTunes varies depending on which version you've got. In the latest version (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.

In older versions (below) you'll need to click Store > Deauthorise This Computer.

How to reset a Mac to factory settings: De-authorise iTunes

Turn off FileVault

FileVault encrypts the files on your hard drive, and it's better to turn it off before going any further (you'll be wiping the files soon, so security shouldn't be a concern).

Open System Preferences and click on Security & Privacy, then select the FileVault tab. Check that it says 'FileVault is turned off for the disc [name of main hard drive]'. If not, click on the padlock icon in the bottom left, enter your password and click on Unlock. Now click Turn Off FileVault.

How to reset Mac: Turn off FileVault

Disable iCloud

Open System Preferences and click on iCloud and tap on Sign Out. To remove all your personal data, deselect each box beside: iCloud Drive, Contacts, Calenders and Reminders.Then click Continue. (Or click 'Delete From Mac' on each popup if you are using an earlier version of MacOS.

Signing out will also remove any Apple Pay card information if you have a MacBook Pro with Touch Bar.

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).

Restart your Mac in Recovery Mode

The best-known way to enter Recovery Mode is to click the Apple logo at the top left of the screen and select Restart, then hold down the Command and R keys until you see an Apple logo or spinning globe. But you may be better off using a different key combination (we have a complete guide to starting a Mac in Recovery Mode here).

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". Read about the three different key combinations you can use to enter Recovery Mode, and the differences between them, here.

The next screen you'll see is the Recovery Mode Utilities window. In Sierra and High Sierra it looks something like this:

How to reset a Mac to factory settings: Utilities

Erase your Mac's drive

Now you are ready to erase your drive... Select Disk Utility and click Continue.

Prior to High Sierra our advice here was to choose 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). To wipe your hard drive, click the Erase button or open the Erase tab and 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.

When it's finished, exit the program by going to the top menu and selecting Disk Utility > Quit Disk Utility.

How to reset a Mac: Erase the hard drive

NOTE: If you are running High Sierra when you look at your Macintosh HD you will see all the Macs you have connected to your Apple ID - so beware, you don't want to accidentally erase the content of any other Macs you own.

Reinstall macOS

Now select 'Reinstall macOS' or 'Reinstall OS X' and follow the onscreen instructions. This will download and install a blank copy of macOS on the Mac. macOS will restart when installation is complete. You may be asked for your Apple ID and password.

If you're passing on the machine, it's wise to quit the setup assistant at an early point and allow the person buying the Mac to enter their own information.