It's a two-step process to reset the switch to factory defaults.
Write erase - To erase the NVRAM config
del flash:vlan.dat - To delete the vlan information from flash.
Then, reload and remember NOT to save the config when prompted.
This link may be helpful.
http://www.cisco.com/en/US/products/hw/switches/ps607/products_tech_note09186a00800c4546.shtml
HTH
Sundar