It’s simple to factory reset a Cisco switch.
01. Use a console cable to connect to the Cisco switch
02. Go to enable mode either with en or enable
03. Input write erase in the console and when prompted confirm(hit enter)
write erase
04. Input delete flash:vlan.dat and when prompted confirm(hit enter)
delete flash:vlan.dat
05. Reload the Cisco switch, but the system will ask to save configuration, input no for that prompt.