First you have to connect the console cable in switch & turned off your switch, open the terminal turn on the power, immediately hold down the Ctrl + P keys from your keyboard, wait for the caption to appear below, if the keys are pressed too late, the device can start booting in normal mode, in this case you have to start this work from over.
#Now show your monitor screen
Welcome to SWITCH Ethernet Switch
#Then click “Enter” its show you
monitor #
#Then type below command to reset configuration
monitor #delete startup-config
#Now erase this file you have to agree & pressing “y” from your keyboard
Done, configuration file erased and you have to restart your switch
monitor #reboot
Type “y” for agree to reboot your device.