This post explains how to clean install OS X Mavericks in your Mac via a bootable flash drive.
It assumes you want to delete all the files in your computer and perform a fresh install.
You will need an empty USB drive before starting this process.
Install OS X Mavericks
Download OS X Mavericks from the Apple Store.
Insert your USB drive and open the Disk Utility application, which can be found by typing cmd+space and typing Disk Utility in the search bar.
Select your USB drive and go into the Erase tab. Once there, choose the option Mac OS Extended (Journaled) and change the name of your drive to Untitled. Click the Erase button to erase and format your USB drive.
Now, we need to copy the Mavericks installer into the USB drive.
Open a terminal and type the following:
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction
note that the name of the USB drive has to be Untitled. You’ll have to enter your superuser password and then you’ll have to wait for the files to be copied. It can take a while…
Once it’s done, restart your computer without removing the USB drive, and hold on the option key (or left alt key).
Next, select your USB drive, named Install OS X Mavericks.
Open the Disk Utility and select your Mac’s Main Drive, usually named Macintosh HD. Once selected, go into the Erase tab and make sure that the Format is set to Mac OS Extended (Journaled). Click the Erase button to erase your startup drive.
Close the Disk Utility by selecting Quit Disk Utility form the top menu.
Now you can install Mavericks by selecting the Install OS X – Install a new copy of OS X.
That’s it! Follow the final steps, like the licence agreement, and wait till you have your Mavericks installed! 😉