Source: http://mashable.com/2013/10/23/clean-install-os-x-mavericks/
This method works for almost all users — it keeps your data and existing programs intact and upgrades your machine to the latest OS. But sometimes, you might not want to do a regular OS upgrade.
It’s possible to do a clean install of OS X Mavericks on your Mac — or on a new hard drive, if you’re upgrading or repairing your Mac — but it takes a bit of work.
The process is a bit more complicated than it has been in previous years, but it’s still relatively easy to create a bootable copy of OS X Mavericks that you can run from a USB stick or other drive.