Here’s a look at what’s involved when you perform a factory reset on your Mac.

What’s Involved in a Factory Reset

Whether you’re preparing your Mac for a new owner or simply starting fresh with your system after troubleshooting has failed, you need to follow several steps to perform a factory reset: back up your computer, disable certain features and services, erase the hard drive, and then reinstall a fresh version of macOS. Afterward, depending on your circumstances, you may want to migrate personal data to a new Mac.

Create a Backup of the System

Your Mac is full of important files and data, so it’s important to make a backup before you proceed with the factory reset process. It’s easy to make a backup with Time Machine. If you’re using iCloud, it’s even easier to ensure all your data is backed up. Here’s a look at the backup process with Time Machine and iCloud.

Create a Backup Using Time Machine

To create a Time Machine backup, you need an external storage device such as a NAS device or a simple external hard drive connected directly to your Mac, such as a USB, Thunderbolt, or FireWire drive.

If Time Machine doesn’t automatically ask to use your drive, add it manually. Once you add your drive, Time Machine can start making backups.

Connect your storage device to your Mac. You may receive a message that says, Do you want to use [Backup Disk] to back up with Time Machine? If so, check Encrypt Backup Disk (recommended) and then select Use as Backup Disk. If Time Machine doesn’t automatically ask to use your drive, add it manually. Select the Time Machine icon (clock) in the Mac’s menu bar. If you don’t see the Time Machine icon on your menu bar, select System Preferences under the Apple menu, choose Time Machine, and then select Show Time Machine in menu bar. Select Open Time Machine Preferences from the menu. Choose Select Disk (it may say Add or Remove Backup Disk). Select your external drive from the list options.  Check Encrypt backups (recommended, but optional) and then select Use Disk. Place a check mark next to Back Up Automatically so Time Machine automatically makes periodic backups.

iCloud Backup

If you already have iCloud and iCloud Drive set up on your Mac, your important files may already be backed up. iCloud keeps your critical personal data synced across your devices as well as backed up in the cloud. This includes contacts, calendar data, notes, mail files, and other files that you select. iCloud Drive stores everything else, including your Desktop and Documents folders, in macOS Sierra and above.

To check on your iCloud and iCloud Drive settings:

From the Apple menu, select System Preferences. Select Apple ID. If you’re using macOS Mojave or earlier, select iCloud instead. Select Options to see the apps that store documents and data in iCloud Drive. Scroll through the list. If there are any unchecked boxes next to apps want to back up, check them now and select Done.

Sign Out of iTunes

Signing out of iTunes is important so that your computer is no longer linked to your iTunes account. The process differs depending on your version of macOS, but you can typically deauthorize one computer without deauthorizing your other devices.

Signing Out of iTunes in Catalina and Later

With Catalina, you access the iTunes Store via the Music app.

Open the Music app on your Mac. Select Music > Preferences from the menu bar. From the General tab of the preferences, select iTunes Store next to Show and then click OK. Select Account in the Music menu bar and choose Authorizations in the drop-down menu. Select Deauthorize This Computer from the fly-out options. You are prompted to sign in with your Apple ID. Select Deauthorize to finish the process.

If You’re Using macOS Mojave or Earlier

Open iTunes.   From the menu bar at the top of your computer screen or at the top of the iTunes window, choose Account > Authorizations > Deauthorize This Computer. When prompted, enter your Apple ID and password. Select Deauthorize. ` For older versions of iTunes, select Store > Deauthorize This Computer.

Turn Off FileVault

FileVault is a disk encryption program available in Mac OS X 10.3 and later. It’s not turned on by default, but if you’re using it, it’s a good idea to turn it off.

From the Apple menu, open System Preferences. Select Security & Privacy. Select the FileVault tab. If you see FileVault is turned off for the disc [name of main hard drive], then you don’t need to do anything. If FileVault is turned on, select the padlock icon, enter your username and password, and select Unlock. Select Turn off FileVault. Enter your username and password when prompted and wait for the process to complete.

Sign Out of iCloud

Now it’s time to sign out of iCloud.

From the Apple menu, select System Preferences. In macOS Catalina (10. 15) and later, select Apple ID > Overview > Sign Out. In macOS Mojave (10. 14) and earlier, select iCloud > Sign Out. You’ll see a message asking whether you want to keep a copy of your iCloud data on the Mac. Because you’ll reformat the hard drive in a later step, select Keep a Copy to proceed. If you have a device with Touch ID, such as a MacBook Pro or MacBook Air, you’ll need to confirm that your payment information will be removed from the Mac. You’re now signed out of iCloud on your Mac. Your iCloud data remains in iCloud and on any other devices you’ve signed in to with your Apple ID.

Sign Out of iMessage

If you’re using OS X Mountain Lion or later, sign out of iMessage.

Open the Messages app. From the Messages menu, select Preferences > iMessage. (In early versions, select Messages > Preferences > Accounts. ) Select Sign Out.

Unpair Paired Bluetooth Devices

This step is optional, but it’s a good idea to unpair Bluetooth devices, such as keyboards, mice, and trackpads, currently paired with your Mac.

From the Apple menu, select System Preferences. Select Bluteooth. Hover the pointer over the device you want to unpair and select the remove button (x) button next to the device’s name. Select Remove in the dialog box asking if you’re sure. If you’re using an iMac, Mac Pro, or Mac mini, you’ll need to use a USB or other wired keyboard and mouse to complete the next step.

Restart Your Mac in Recovery Mode

From the Apple menu, select Restart. Press and hold Command+R. Release the keys when you see an Apple logo, spinning globe, or another startup screen, depending on your macOS version. Enter any passwords requested. The process is complete when you see the Utilities window.

Erase Your Disk

We’ll first look at this process in Catalina, because this macOS adds a second data volume.

If You’re Using Catalina

Select Disk Utility from the Utilities window in macOS Recovery. Select Continue. Make sure Disk Utility’s sidebar shows your hard drive’s name. Your startup disk should be called Macintosh HD unless you renamed it. In the sidebar, locate a data volume with the same name as your hard drive, for example, Macintosh HD - Data. If you have this volume, select it. Select Edit > Delete APFS Volume from the menu bar or select the delete volume button (–) in the Disk Utility toolbar. When prompted to confirm, select Delete. (Don’t select Delete Volume Group. ) After deleting the volume, select Macintosh HD (or whatever you named your drive) in the sidebar. Select the Erase button or tab. Enter a name that you want the volume to have after you erase it, such as Macintosh HD. Under Format, choose either APFS or Mac OS Extended (Journaled) to format as a Mac volume. Disk Utility shows the recommended Mac format by default. Select Erase to begin erasing the disk. You may be prompted to enter your Apple ID. When done, quit Disk Utility to return to the Utilities window.   Select Reinstall macOS from the Utilities window and follow the on-screen instructions to reinstall macOS on the volume.

If You’re Using Mojave or Earlier

In these macOS versions, there’s no additional volume to delete.

Select Disk Utility from the Utilities window in macOS Recovery. Select Continue. Select your main hard drive, typically called Macintosh HD, in the sidebar on the left.   Select the Erase button. Select a name and format for your storage drive and press Erase. Select Reinstall macOS from the Utilities window and follow the on-screen instructions to reinstall macOS on the volume.

‘Erase Content and Settings’ in macOS Monterey and Later

If your Mac is running macOS Monterey (12.0) or newer, you have another option. The “erase all content and settings” option in System Preferences lets you quickly and securely remove all of your information and the apps you’ve downloaded. This process is faster because it only gets rid of your stuff; it doesn’t remove macOS. Along with the speed with deleting, it’s also faster to get the Mac set up again because you (or the person you sell it to) won’t have to reinstall the operating system.

After you’ve wiped the drive clean and reinstalled macOS (if applicable), the Mac restarts to a Welcome screen and asks you to choose a country or region. If you’re selling or giving away the system, don’t continue the setup process. Rather, press Command+Q to shut down the machine. The setup assistant will guide the new owner on the process.