Backup of https://fatmin.com/2014/12/02/how-to-reset-cisco-catalyst-3750-back-to-factory-defaults/ by Christopher Paquin in case it ever goes dark.
Need to reset your Cisco Catalyst 3750 back to the factory default settings? Have you forgotten your password? Well you have come to the right place. Note that I am assuming that you have already established a console connection to the switch using a Cisco serial cable (rollover cable).
First you need to power down the switch. Once the switch is powered off, hold down the mode button, and power the switch on. The switch will boot up and you should see the switch prompt as shown below.
Now type flash_init. Your output should be similar to what you see below