How to Restore Macbook to Factory Settings
When it's time to sell your Macbook, you should wipe the hard drive and sell it in factory settings. If the Macbook is restored like that, it will also become more attractive in the eyes of buyers. Make sure you're connected to the Internet before restoring your Macbook..
Erase data on hard drive
Restart your Macbook. Click on the apple icon in the top left corner of the screen and select 'Restart'.
Press and hold Command + R. Do this when the gray screen appears during startup.
Select Wi-Fi network. This option may not be available.
Select 'Disk Utility. '
Erase the hard drive. Select the hard drive in the list, then click 'Erase'.
Select 'Mac OS Extended (Journaled)'. This option will appear in a new window.
Type a new name. This will be the new name of the hard drive.
Click "Erase. " This step erases data on the hard drive.
Reinstall the operating system
Exit Disk Utility. Once the hard drive is erased, click 'Disk Utility' then select 'Quit Disk Utility'.
Click the Reinstall OS X option. Click 'Continue'.
Follow the instructions on the screen. Please complete reinstalling the operating system.