How to reset Cisco 2960 switch to default settings

We can reset the Cisco 2960 settings by erasing its configuration files. To do it, connect your console cable to the switch and open up your terminal emulator software, you can use minicom if you are using Linux. Please visit this link on how to install and configure minicom in Fedora/Red Hat/CentOS and this link if you are using Debian/Ubuntu.

Power on the switch while holding the mode button. Release the mode button after you see the screen below in your terminal emulator software.

Boot Sector Filesystem (bs) installed, fsid: 2
Base ethernet MAC Address: c4:71:fe:2c:2e:00
Xmodem file system is available.
The password-recovery mechanism is enabled.

The system has been interrupted prior to initializing the
flash filesystem.  The following commands will initialize
the flash filesystem, and finish loading the operating 
system software:



Initialize the flash file system using the below command.

Initializing Flash...
flashfs[0]: 528 files, 19 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 32514048
flashfs[0]: Bytes used: 10419200
flashfs[0]: Bytes available: 22094848
flashfs[0]: flashfs fsck took 11 seconds.
...done Initializing Flash.


Find the config files in flash: directory

dir flash:

The files that we are looking for in the flash: directory are config.text and vlan.dat.

Directory of flash:/

    2  -rwx  2664                     config.text
    3  -rwx  2072                     multiple-fs
    4  -rwx  1919                     private-config.text
    6  drwx  192                      c2960-lanbasek9-mz.122-44.SE6
  548  -rwx  3016                     vlan.dat

22094848 bytes available (10419200 bytes used)

Delete these files using delete command.

del flash:config.text
Are you sure you want to delete "flash:config.text" (y/n)?y
File "flash:config.text" deleted

del flash:vlan.dat
Are you sure you want to delete "flash:vlan.dat" (y/n)?y
File "flash:vlan.dat" deleted

Then type the below command to boot to the switch.


This tutorial will also work on Cisco 2950 switches. Hope this helps.