How to Reinstall OS X Mavericks
There are instances in which you may want to erase some, or all, of the files from the hard drive on your Mac. To erase your Mac computer’s hard drive and reinstall OS X Mavericks, you can use the built-in recovery disk. Your files and user settings will not be lost. To reinstall OS X, you must be connected to the internet.
Before you erase your computer, back up your data, or at least all essential files, using Time Machine or other backup methods for OS X Mavericks or Mountain Lion. If you’re installing OS X Mavericks on a portable computer, make sure your power adapter is plugged in.
First, choose Apple Menu > Restart. Once your computer restarts and the gray screen appears, hold down the Command (⌘) and R keys. If you’re not connected to the internet, choose a network from the Wi-Fi menu, in the top-right corner of the screen.
Next, select Disk Utility and click Continue. Select your start-up disk on the left. Now, click the Erase tab.
Choose Mac OS Extended (Journaled) from the Format menu, enter a name, and click Erase. After the disk is erased, choose Disk Utility > Quit Disk Utility.
Select Reinstall OS X, click Continue, and follow the on-screen instructions. In the pane where you select a disk, select your current OS X disk. Also note than in most cases, it’s the only one available.
If you will be erasing the data before you sell your Mac or give it away, after the data is erased, reformat your hard drive and reinstall OS X. Your Mac will restart to a Welcome screen and ask you to choose a country or region. Don’t continue with the setup of your system. Instead, press Command-Q to shut down the computer. The Setup Assistant will guide the new owner through the setup process as soon as he or she turns on their new device.