How do I completely wipe my MacBook clean?

Completely wiping a MacBook to factory settings is an effective way to remove all personal data and reset the computer before selling or passing it on to someone else. A complete wipe will restore the MacBook to the same condition it was in when you first took it out of the box.

Why Would I Want to Completely Wipe My MacBook?

There are a few key reasons why completely wiping your MacBook is recommended:

  • Remove all personal data – Wiping your MacBook removes all user accounts, applications, files, settings, etc. This ensures no personal or sensitive data remains on the device.
  • Eliminate malware/viruses – Wiping the MacBook resets the operating system which can eliminate any malware or viruses that may have infected the computer.
  • Improve performance – Over time, unused files and clutter can build up on a MacBook slowing down performance. Wiping clears out any unnecessary data.
  • Pass on or sell MacBook – Wiping your MacBook removes all of your personal data so you can comfortably sell or gift the device to someone else.
  • Fix software issues – A complete wipe can fix some system software problems by fully resetting the operating system.

How to Backup MacBook Before Wiping

Before wiping your MacBook you’ll want to ensure you have backups of any important files or data. Here are some tips for backing up a MacBook before a wipe:

  • Use Time Machine – Time Machine is the built-in Mac backup software. Connect an external hard drive and use Time Machine to create a full system backup.
  • Clone drive – Use a drive cloning tool like Carbon Copy Cloner to create an exact duplicate of your hard drive you can use for backup.
  • Back up key files – Manually drag and drop important documents, photos, music etc. to an external hard drive or cloud storage.
  • Sign out of accounts – Be sure to sign out of any accounts on the MacBook like iCloud, email, messaging, etc. This will deassociate the devices from those accounts.
  • Deauthorize media – Deauthorize any iTunes media tied to the MacBook so that content can be authorized on a new device later.

How to Completely Erase and Wipe a MacBook

There are a couple options for completely wiping a MacBook depending on your specific needs:

Option 1: Erase All Content and Settings

This is the simplest option to erase all data and reset the MacBook to factory default settings:

  1. Backup your MacBook data using Time Machine or another option.
  2. Restart your MacBook and when you hear the startup chime hold down Command+R keys to boot into Recovery mode.
  3. When the Recovery interface appears, click on Disk Utility.
  4. Select your primary internal hard drive from the left sidebar.
  5. Click Erase at the top of the Disk Utility window.
  6. Set Format to Mac OS Extended (Journaled) and Scheme to GUID Partition Map.
  7. Click Erase to confirm the disk erase. This may take several minutes.
  8. When complete, quit Disk Utility and return to the main Recovery window.
  9. Go to Reinstall macOS (or Reinstall OS X on older versions) and follow the prompts to reinstall the operating system.
  10. The MacBook will reboot a couple times during setup and will eventually reach the registration screen to create a new user account.

This process will completely clear all data and restore the MacBook to the factory OS and settings without any of your personal data or customization.

Option 2: Securely Erase Hard Drive

For greater security, you can also completely wipe the hard drive using several erase passes to make recovery impossible:

  1. Backup data and boot into Recovery mode as above.
  2. Launch Disk Utility from the Recovery screen.
  3. Select the primary hard drive and click Erase.
  4. Choose Mac OS Extended (Journaled) format and GUID Partition Map scheme.
  5. In the Security Options box, move the slider to the Most Secure level to perform a 7-pass erase.
  6. Click Erase and let the secure erase run. This may take several hours to complete.
  7. When done, reinstall macOS and create a new user account.

This securely erases all data by overwriting the drive 7 times conforming to DoD 5220.22M standards. This process takes much longer but is more secure.

How to Erase and Reinstall macOS from macOS

You can also erase and reinstall macOS without using Recovery mode by booting directly into the operating system:

  1. Backup data.
  2. Restart Mac and immediately press Command+Option+R to boot into macOS (do not release keys until you see Apple logo).
  3. A macOS Utilities window will appear. Go to Disk Utility.
  4. Select primary hard drive and click Erase, choosing Mac OS Extended (Journaled) format.
  5. Quit Disk Utility when done erasing.
  6. Go back to macOS Utilities window and choose Reinstall macOS.
  7. Follow prompts to complete macOS install and create a new user.

This boots directly into macOS to perform the erase and reinstallation process rather than booting into the Recovery partition first.

How to Erase MacBook Using Terminal

You can also use Terminal to enter disk utility commands to securely erase the hard drive. Here are the steps:

  1. Backup data.
  2. Launch Terminal (found in /Applications/Utilities/).
  3. Type diskutil list and note the identifier for your primary hard drive (often disk0).
  4. Run diskutil eraseDisk JHFS+ <DiskName> disk0 replacing <DiskName> with a name for the wiped volume.
  5. Or for a 7-pass secure erase run:
    diskutil secureErase <level> /dev/disk0

    Where <level> is one of:

    • 0 – Single-pass zero-fill erase
    • 1 – Single-pass random erase
    • 2 – US DoD 7-pass secure erase
    • 3 – Gutmann algorithm 35-pass secure erase
    • 4 – US DoE algorithm 7-pass secure erase
  6. Quit Terminal when complete and reinstall macOS if desired.

Using Terminal provides more advanced command line control over the erase and reinstallation process.

Tips for Erasing All Data From a MacBook

Here are some additional tips for fully wiping a MacBook cleanly:

  • Check for firmware passwords – Make sure no firmware password is set on the MacBook which could prevent the erase.
  • Disable Find My Mac – Turn off Find My Mac activation lock to avoid any activation lock issues later.
  • Remove Apple ID – Sign out of your Apple ID on the MacBook so it is no longer linked to your account.
  • Disconnect from network – Disconnect from any network during the wipe to maintain privacy.
  • Check for success – Check disk utility after the wipe to confirm the drive shows no used data.
  • Consider physical destruction – For absolute data destruction, consider physically destroying the hard drive.

Best Practices for Passing on or Selling Old MacBook

If you plan on selling or giving away your MacBook after wiping it, keep these best practices in mind:

  • Fully charge the battery – Make sure the battery has a full charge before passing it on.
  • Clean the machine – Wipe down the MacBook chassis and clean the screen to remove scratches/dust.
  • Include accessories – Bundle any useful accessories like the power adapter to add value.
  • Get documentation – If available, provide documentation, recovery media, original packaging.
  • Disclosure – Disclose any hardware issues or damage upfront to set expectations.
  • Remove login items – Check system preferences to remove any saved login items.
  • Clear browser data – Clear all browser history, caches, cookies, etc. after wiping.
  • Remove iCloud lock – Confirm no Find My Mac activation lock is present.
  • Create listing – Take quality photos and write an honest product listing when selling online.

Taking these steps helps ensure a transparent process so the new owner can enjoy the MacBook functioning like new.

Conclusion

Completely erasing and wiping your MacBook cleans the slate and provides a fresh instance of the operating system without any leftover personal files or settings. Make sure to fully backup your data before wiping your MacBook. The easiest option is to use the Erase All Content and Settings option from the Recovery partition. For maximum security, perform a 7-pass secure erase from Recovery or Terminal. With a wiped MacBook free of any previous data, you can comfortably pass it on to a new owner or prepare it for resale. Just be sure to reinstall the operating system after wiping so it’s functional for the next user.