How do I erase my switch configurations when I'm done with the switch?
How to erase switch configurations
This article assumes that you are already connected to the switch and have access to the EXEC mode CLI (i.e., the prompt ends with a # sign, similar to Switch#. If you can't get to this prompt because of an unknown password, check out this knowledgebase article.
To erase your switch configurations, follow these steps:
- From the privileged EXEC prompt, type the command
delete vlan.dat
to erase the file containing VLAN and VTP information. - You will receive the following message:
Delete filename [vlan.dat]?
Press ENTER to confirm. - You will then receive another prompt with the following message:
Delete flash:vlan.dat? [confirm]
Press ENTER to confirm. - From the privileged EXEC prompt, type the command
erase startup-config
which will delete the startup configuration. - When you receive the following message:
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
Press ENTER to confirm. - Now restart the router by entering the command
reload
. - You may receive a message that says:
System configuration has been modified. Save? [yes/no]:
Typeno
and press enter to ensure you don't save anything before reloading. - Finally, you will receive the following message:
Proceed with reload? [confirm]
Press ENTER to confirm.
When the switch restarts, it should prompt you to enter the initial configuration dialog, at which point you can disconnect from the switch.