- ⌘ + R for factory restore. (and hit the power button)
- Providing you still have your recovery partition it will use the latest OS you have installed (ie: Yosimite)
- When install OS X Yosemite appears click continue.
- Agree to the terms of service and install the OS on your selected drive and go.
- option + ⌘ + R for internet recovery. (and hit the power button)
- This will install the OS that you bought the machine with.
- Click Disk Utility and click continue
- Click Macintosh HD
- Click Partition
- For each volume
- click unmount
- click the - sign
- click remove to delete them.
- if they do not delete you may have to erase them first (I had this happen with an ext4 volume)
- At this point you should have no volumes whatsoever
- Create a new volume by clicking on the + and set the name to "Macintosh HD" then click apply then click partition.
- exit Disk Utility
- Click Reinstall OS X and click "continue". Depending on your OS is you might another one like Mountain Lion or Lion and may need to do this step then install Yosemite once you get back into the system.