Quick navigation:

Before you format Mac and restore it to its factory settings, you need to know how to do it right and how to recover files after reinstalling macOS in case something goes wrong during the formatting process. If you encounter problems when formatting your Mac, you might need to pick the best data recovery software for Mac to get back your lost data. You can't afford to risk losing your data, so it's only natural that users ask, "How do I format my Mac?"

This guide will walk you through formatting your MacBook Pro, or any other Mac computer, for any reason or to resolve any potential issues. It also includes precautions to take if you accidentally delete data during the process.

Why You Should Format Your MacBook Pro/Mac

Format MacBook Pro

There are several reasons you might want to restore your Mac to its factory settings, including:

Prepare it for its new owner: If you're selling, trading in, or giving away your Mac, you need to erase your data so the new owner gets a clean start.

Startup and Performance Issues: If your Mac is running slow or has startup problems due to aging or multiple apps, it can speed things up.

Virus or malware attack: A virus or malware could infect your Mac and take control of its functions. Formatting your Mac can help remove such infections.

Related Articles

How to Format USB Flash Drive to FAT32 on Mac without Data Loss

Users working with a USB drive might need to format it to the FAT32 file system.

Format USB to FAT32 on Mac

Factors to Consider Before Formatting a MacBook Pro/Mac

To prevent data loss and protect your information from unauthorized access, consider doing the following before you format your Mac:

1. Backup your data

Before erasing your Mac, make sure to back up all of its data and files, as you will lose everything if you don't. If you use Time Machine, your contacts, photos, documents, emails, and other selected data should be automatically backed up on your Mac. Additionally, if you find that important data was deleted during the formatting process, it's easy to restore a Time Machine backup to your Mac. If not, you can manually back up your data by copying the files to an external drive.

2. Unlink your app and account

Before you erase, sign out of all accounts and disconnect apps from your Mac manually. Originally, you could use iTunes to do this. But now, you must individually deauthorize each app (iTunes Music, TV, and Books) from your account to remove their access to your purchases, like music, apps, movies, and books. To do this:

Step 1: Open any application > Go to Account > Authorization > Deauthorize This Computer.

Deauthorize This Computer

Step 2: Enter your Apple ID and password

Please enter your Apple ID and password: Enter Apple ID and password

Step 3: Click on the "Revoke Access" button.

In addition, quit any other third-party apps on your Mac that use device-based licenses.

3. Sign out of your iCloud account

You also need to remove any remaining information that links your Apple ID to the device. This means signing out of all accounts associated with you on the device. To sign out of iCloud, do this:

Step 1: Click the Apple icon in the top-left corner of your MacBook Pro's screen, then select "System Preferences."

System Preferences > iCloud

Step 2: In Preferences, click on iCloud > uncheck all the boxes in the list to remove copies of this data from your Mac > Click Sign Out.

Sign out of iCloud

4. Exit the messaging app

You'll also need to quit the Messages app on your Mac and delete all messages and conversations from it.

Step 1: Open the Messages app on your Mac > Go to Messages > Preferences.

Message Preferences

Step 2. Click on the iMessage tab and then click on Sign Out.

5. Unpair Bluetooth devices

If you're giving your Mac to someone else in your household – say, a child, sibling, or spouse – unpair any Bluetooth devices connected to it so that your mouse or keyboard doesn't take control of it. Here's how:

Step 1: Go to System Preferences > Bluetooth, and hover over the device/gadget you want to unpair.

Step 2: Click the X button to the right of its name.

Click the x button on the right of the Bluetooth device

Step 3: Click Remove.

Your Mac is now ready to be returned to its original settings, and you can do so without worrying about losing your data or handing it over to someone else.

How to Format a MacBook Pro or Any Other Mac Computer

There are several ways to format a MacBook Pro or any other Mac computer. Here are the main methods you can use.

Method 1: Format Using Disk Utility

Disk Utility Features

Disk Utility is a built-in Mac tool that can help you wipe your Mac. Here's how to format your Mac using Disk Utility:

Step 1: Start up from macOS Recovery > Turn on or restart your MacBook Pro > Hold down Command (⌘) and R.

Command and R keys

Step 2: Choose a user password > In the macOS Utilities window, choose Disk Utility > Continue.

macOS Utilities window

Step 3: Select the Mac system disk - named "Macintosh HD" > Click the "Erase" button in the toolbar > Follow the prompts to enter the formatting information:

Format: Mac OS Extended (Journaled) or APFS (or whatever Disk Utility recommends).

Mac OS Extended (Journaled)

Step 1: Tap on “Erase” and, if prompted, enter your Apple ID and password. Wait for the erasure to complete.

If you see the “Erase Volume Group” button, click it.

When done, you can delete any other internal volumes from the sidebar. Ignore any internal volumes named "Macintosh HD" or "Macintosh HD Data."

Step 2. Exit Disk Utility now and return to the Utilities window > Proceed with erasing your Mac by reinstalling macOS.

Step 3. Back in the macOS Utilities window, select “Reinstall macOS” and click “Continue.”

Reinstall macOS Option

Step 4: Follow the on-screen instructions/prompts to reinstall the new macOS.

Method 2: Format by Reinstalling the Operating System

Reinstall a new copy of OS X

Another way to format your Mac is by reinstalling OS X. You'll start this process from macOS Recovery, which you access like you would Disk Utility. This process also requires an internet connection to complete the installation of macOS.

Step 1. Turn on or restart your MacBook Pro while holding down the Command(⌘) and R keys until you see the Apple logo or another startup screen or image.

2. Click “Reinstall macOS” or “Reinstall OS X” > Continue > In the left sidebar, click on the boot drive: by default, this is “Macintosh HD”.

Macintosh HD startup disk

If your disk has a different name, choose the new name, then click Install > wait for the installation to complete > your MacBook Pro restarts.

Step 4: If you're keeping the Mac, continue with the setup. If you're selling it, transfer your saved files to an external hard drive, then press ⌘+Q to quit the Setup Assistant.

mac-external-drive

Step 5: Power down your Mac, and you're done.

Method 3: Formatting Through the Terminal

Mac OS X Terminal

Formatting macOS through the Terminal or command line is a more advanced process that requires exact syntax to ensure your Mac is erased correctly. This method is only recommended for advanced users, but if you're ready, follow these steps:

Step 1. Go to Applications > Utilities, and select Terminal.

Mac Utilities Terminal

Step 2. Alternatively, restart your Mac and hold down Command ⌘ + R > From the macOS Utilities window, select Utilities and Terminal.

Step Three: In the Terminal, type xartutil --erase-all and press Return. > If prompted, type yes and press Return. > Choose Terminal from the Apple menu and click Quit.

What to do if data is deleted during formatting?

Formatting will erase your MacBook Pro, and if you haven't backed up your data, you risk losing important information. But all is not necessarily lost.

You can still attempt to recover your deleted data using efficient software like Data Recovery Wizard for Mac. This tool helps recover lost data from various scenarios, such as deletion, formatting, system crashes, macOS recovery errors, virus attacks, and hard drive damage.

Not only can it recover deleted files from Mac trash, but it can also retrieve music files, photos, videos, emails, documents, and more from various Mac-based devices: SSD, HDD, fusion drives, Time Machine backups, and so on. It recovers your data no matter the size.

Here are the steps to download, install, and use the Mac Data Recovery Wizard utility:

Step 1. Select the drive to scan

In the main “Data Recovery Wizard” tool window, all the drives connected to your Mac will be listed. Select the drive from which you need to recover lost/deleted files and click on the “Search for Lost Files” button.

Note: Before you recover data, it's recommended that you click “Disk Backup” from the left sidebar to back up your Mac to prevent further data loss. After the backup, the software can restore data from the Mac backup, and your computer can write new data again.

Select the location and scan for lost Mac data

Step 2: Select the data/files you lost

Data Recovery Wizard for Mac will scan the disk volume you select immediately, and display the scanning results on the left. You can sort the results to locate the files you need if you are looking for specific ones.

Select the lost data/files

Step 3: Recover Lost/Deleted Data

Once you find the files to recover, preview them and then click on “Recover” to start restoring your deleted/lost files from Mac.

Recover Lost Data from Mac

Conclusions

If you're selling, trading in, or giving away your Mac, don't let it go with your data and accounts on it. Your data security is important, and formatting your Mac helps protect it. Now you know how to format your MacBook or any other Mac using three methods: Disk Utility, reinstalling macOS, and the Mac Terminal.

We've also got some tips to ensure you don't lose your files, apps, photos, and other data when formatting your MacBook Pro. If you accidentally delete your data in the process, use the Data Recovery Wizard for Mac tool to retrieve them.