If you work in networking, to rest a Cisco switch to factory settings is one of those tasks you will often need to do. Whether its an existing switch you can log into or an inherited switch you do not have the password, the below guide will help you reset your Cisco 2960 series switch to factory defaults.
If you can log into your switch.
Step 1 : Connect to your switch via a console cable and connect to the console.
Step 2 : Use the following commands to reset the Cisco switch to factory defaults
Router: en
Router#erase startup-config
answer “y” to confirm, then
then
Router# del flash:vlan.dat (needed to remove vlans)
Step 3: Reload the switch – Router# reload
If you cannot log into your switch
Step 1: Connect up your console cable and connect to the console. Power on the switch, whilst holding down the “mode” button:
This interrupts the boot process before the Flash file system can initialise, and after a short while (continue holding the “mode” button) you will see the following prompt:

Step 2 : Type command line – flash_init

Step 3 : Use the following 2 command to delete configuration files
del flash:config.text
del flash:vlan.dat

Step 4 : reload the Switch by using the “boot” command



