Reinstall Mac OS X Mountain Lion before selling a Mac
If you happen to already have an installable copy of Lion or Mountain Lion,


back up your personal data
make a bootable thumb drive to install from
boot from the thumb drive
select Disk Utility
repartition and reformat your drive
there should be an arrow to skip the Apple ID entry and continue the install.


Either of the two ways should get you a virgin install.

The other way is to do a recovery boot by holding down COMMAND-R when powering on before your Mac chimes. It will be slow since all files load from Apple's servers. Follow the six steps above for a clean install.