Step 1 Clone your hard drive
Clone your hard drive and securely wipe the original
Remove all your personal data and set up a clean installation of Mac OS X
How do I reset my Mac to factory settings? It’s a question that many Mac OS X users ask prior to selling or handing on a beloved Mac. It’s safer to pass on a Mac with personal information removed, and a clean version of Mac OS X looks healthier to the buyer. Our guide to clearing all your information and data from a Mac enables you to reset Mac OS X to an unblemished factory state, as it was fresh out of the box. Discover how to wipe all your personal information from Mac OS X on an iMac, Mac Pro, MacBook Pro, MacBook Air and MacBook.
Step 2 reset your hard drive
Here are the general steps to reset your hard drive (they are outlined in detail below):
Make sure you are connected to the Internet so you can download the latest copy of Mac OS X.
Use an app like SuperDuper or Carbon Copy Cloner to clone your internal hard drive to an external drive. This enables you to access all your old files, and the drive can be re-cloned to the internal drive if you want to restore your Mac.
Deauthorize your iTunes store account. (You should also deauthorize any third-party apps, such as Photoshop, that are locked to your Mac).
Turn off FileVault (if you are using it).
Sign out of iCloud.
Restart the Mac in Recovery Mode (hold down Command and the R key during restart).
Use Disk Utility to erase the hard drive. Click on Disk Utility > Continue. Select the main volume and click Unmount then Erase). Quit Disk Utility (Disk Utility > Quit Disk Utility).
Click Reinstall OS X and Continue. Follow the instructions to reinstall Mac OS X.
The process of resetting a MacBook to factory settings gets rid of all your data from the Mac. Obviously, you should transfer data from your old Mac to a new one, but it’s worth making a clone of the whole hard drive and keeping it around for a while. The best way to do this is using a program like Carbon Copy Cloner or SuperDuper along with an external hard drive (both options are now paid-for sadly). Choose your main hard drive in the source, and your external hard drive in the Destination. Now click on Clone.
You should be able to boot from the cloned external hard drive. To test this, reset your Mac and hold down Option when you first boot up your Mac. Use the arrow keys on your Mac to select the external drive and tap Enter. This cloned drive can be re-cloned back to the main drive if you decide to restore your Mac, or it can be used to access all the original files from your computer after you have wiped the internal hard drive.
(Even though the software is bundled with Mac OS X, it’s worth noting that Carbon Copy Cloner is now a paid-for app).
Step 4: De-Authorising iTunes
remove your Apple ID completely: shut down your iTunes Store, iCloud and other accounts
Turn off FileVault
FileVault encrypts the files on your hard drive, and it’s better to turn it off before going any further (you’ll be wiping the files soon so security shouldn’t be a concern). Open System preferences and click on Security & Privacy and FileVault. Check that it says FileVault is turned off the for the disc [main hard drive]. If not click on the padlock icon in the bottom left, enter your password and click on Unlock. Now click Turn Off FileVault.
Apple Support: File Vault 2
Macworld Secrets: Stay secure with Lion’s FileVault 2
Step 5: Disable iCloud
Open System Preferences and click on iCloud and tap on Sign Out Now. To remove all your personal data, click ‘Delete From Mac’ on each popup (although you’ll be wiping the hard drive in the next step anyway).
How to set up iCloud
Step 6: Restart the Mac in Recovery Mode
First of all make sure you are connected to the Internet (open Safari and browse around). You need an internet connection to install Mac OS X. Restart the Mac by clicking on Apple > Restart and hold down the Command and R keys until the Recovery Mode Utilities window appears.
Apple Support: Mac OS X Recovery
How do I restore my Mac with Time Machine
Step 7: Erase the drive
Select Disk Utility and click on Continue. Now choose your main Startup Volume (typically called Macintosh HD in the sidebar on the left, and click on Unmount. Now choose the Erase tab and click Erase to wipe your hard drive. Note that this permanently erases all data on the hard drive so don’t do this unless you’ve cloned the drive or are happy to never have to get something from that drive again. When it’s finished exit the program by choosing Disk Utility and Quit Disk Utility.
Apple Support: Disk Utility
Macworld Help: Securely wipe your hard drive
Step 8: Select Re-install Mac OS X
Now click on Reinstall OS X and continue to follow the on-screen instructions. This will download and install a blank copy of Mac OS X Yosemite on the Mac. Do not enter your Apple ID and password during setup though; allow the person buying the Mac (if that’s the case) to finish the setup process themselves.