How to reset a switch & router back to factory defaults


#1

I recently purchased some switches and routers from eBay. What is the proper way to wipe and reset to factory defaults?


#2

This should get you started:

R1#write ?
  erase     Erase NV memory
!
R1#write erase 
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
R1#
!
R1#delete flash:vlan.dat
Delete filename [vlan.dat]? 
Delete flash:vlan.dat? [confirm]
R1#