When you need to delete unwanted configurations on a switch or have forgotten the switch's password, this document can help. This guide uses the Cisco Catalyst 2960-S as an example to reset the switch to factory default settings.
Before performing the reset, ensure the following preparations are made:
1.Prepare a console cable to connect the switch's console port to the computer's serial port.
2.Open terminal software on the computer (e.g., SecureCRT). As shown in the GUI below, set the connection to Serial, baud rate to 9600, no parity, no flow control, and 1 stop bit.
3.Enter Recovery Mode
Plug in the switch’s power supply and start the switch.
Press and hold the "Mode" button on the switch until it enters console mode. The prompt will display as "switch:".
4.Enter the command flash_init and press Enter to initialize the flash file system.
5.Enter dir flash: and press Enter to view the switch’s configuration files.
Then, enter rename flash:config.text flash:config.bak and press Enter to rename the original configuration file to config.bak.
oUse dir flash: again to confirm the filename change was successful.
Finally, enter boot to restart the switch.
6.In User EXEC mode, enter enable to access Privileged EXEC mode.
In Privileged EXEC mode, enter erase startup-config and write erase to reset the switch to factory default settings.