Transfer Your Mac to a New Owner
If you plan on selling a Mac, you will want to take a few measures beforehand, rather than handing the machine off as it is. The most important steps before selling or transferring a Mac to a new owner are as follows:
Back up everything: Backing up all of your important files and data stored on the Mac is crucial. Since many apps are available for downloading again through the App Store, just choose the apps you’ll need. The easiest way to back up your computer completely is through Time Machine. Using Time Machine is easy. Just connect the Time Machine drive to the Mac, pull down the Time Machine menu icon, and choose Back Up Now. All your data, apps, and customization will be saved. Additionally, Time Machine allows you to migrate everything over to a new machine with Migration Assistant.
Deauthorize the Mac with iTunes: This process securely erases all data so that no future owner can access it. To do so, launch iTunes, pull down the Store menu and choose Deauthorize This Computer. If you change your mind later and decide to maintain ownership of the Mac, you can reauthorize the computer again through the same menu.
Erase all data by securely formatting the hard drive: After you’ve backed up everything and deauthorized the Mac, securely erase the entire hard drive so that none of your personal data can be recovered. To do so, reboot the Mac from Recovery Mode and target the primary partition with a secure format. Reboot the computer and hold down the Option key. Select the Recovery partition from the boot menu, select Disk Utility from the OS X Utilities menu, then select the hard drive primary partition. Next, choose the Erase tab, click the Security Options button, and choose 7-Pass Erase or 35-Pass Erase (extremely secure but much slower). Finally, click OK, and click Erase to format the drive. All data will be wiped from the Mac securely. Keep in mind that this may take a while depending on which security method you chose.
Optional: Reinstall OS X. If you reinstall OS X, the new owner receives the Mac as if it was brand new, complete with the initial setup screens. Unless you are using a boot installer USB drive, this process requires internet access so that the installer can be retrieved from Apple’s servers. To do this, in Recovery Mode, choose Reinstall OS X from the OS X Utilities menu screen. Reboot holding down the Option key if you are no longer in Recovery. Click Continue and select the newly formatted Macintosh HD partition, then click Install. OS X will reinstall fresh. When finished, booting the Mac will appear as if it was brand new. Now, you can leave it as it is so that the new owner can go through the configuration process themselves.