How to erase my user data on company's macbook? [duplicate]

I would like to sell my Macbook Pro, but I want to make sure that there is no way to retrieve the deleted data from my SSD.

Is there a way to completely delete all files on a hard drive so that even a forensic expert cannot recover anything?


You don't need to.

Once you erase an SSD on a Mac, it's unrecoverable even from a forensics standpoint. This is because of the type of TRIM command that the hardware (SATA controller on the logic board and the SSD) issues. Basically, if you were to stop an erase mid-process you theoretically could take it to a lab or the manufacturer to recover data. So, it's not impossible but highly, highly improbable recovery is possible. I've previously written about this topic:

  • Can the data on an MacBook Pro SSD be recovered after formatting using Disk Utility
  • How to get the "securely erase" function of Disk Utility on El Capitan & Sierra
  • https://apple.stackexchange.com/a/288756/119271
  • Recovering files from SSD and SSD life?

If you want to be even more certain, turn on File Vault (Apple recommends this) when you reset it. Then disable it (for the next user).


Because you have a SSD installed in your MBP, you cannot use the 'secure erase', nor the 'erase free space' options in Disk Utility. It is better to boot your MBP into macOS Recovery while your SSD is protected with FileVault, then wipe the drive and reinstall macOS.

From this post at Backblaze are instructions on how you can also use Terminal commands whilst in macOS Recovery to do the secure erase you're looking for:

Securely Erasing Free Space on Your SSD

If you don’t want to take Apple’s word for it, if you’re not using FileVault, or if you just want to, there is a way to securely erase free space on your SSD. It’s a little more involved but it works.

Before we get into the nitty-gritty, let me state for the record that this really isn’t necessary to do, which is why Apple’s made it so hard to do. But if you’re set on it, you’ll need to use Apple’s Terminal app. Terminal provides you with command line interface access to the OS X operating system. Terminal lives in the Utilities folder, but you can access Terminal from the Mac’s Recovery System, as well. Once your Mac has booted into the Recovery partition, click the Utilities menu and select Terminal to launch it.

From a Terminal command line, type:

diskutil secureErase freespace VALUE /Volumes/DRIVE

That tells your Mac to securely erase the free space on your SSD. You’ll need to change VALUE to a number between 0 and 4. 0 is a single-pass run of zeroes; 1 is a single-pass run of random numbers; 2 is a 7-pass erase; 3 is a 35-pass erase; and 4 is a 3-pass erase. DRIVE should be changed to the name of your hard drive. To run a 7-pass erase of your SSD drive in “JohnB-Macbook”, you would enter the following:

diskutil secureErase freespace 2 /Volumes/JohnB-Macbook

And remember, if you used a space in the name of your Mac’s hard drive, you need to insert a leading backslash before the space. For example, to run a 35-pass erase on a hard drive called “Macintosh HD” you enter the following:

diskutil secureErase freespace 3 /Volumes/Macintosh\ HD

Something to remember is that the more extensive the erase procedure, the longer it will take.


Yes

You can boot into the recovery mode and then erase your hard drive. By turning on security options when erasing the drive, it will overwrite the drive completely multiple times, which will make it nearly impossible to read any data again.

There is a good guide about how to prepare your Mac before selling it, which can be found here. Only thing to add is to enable security options when deleting - as mentioned by the answer from @IconDaemon this is not as easily possible on SSDs. Even the Apple support page has a clear guide on what to do.

Note: It took me one search with the keywords erase mac hard drive for sale to find this article at the top.