If you don't know the password then you need to follow below step in order to unconfigure all the configuration from switch.
1. Reboot the switch by unplugging the power and plugging it back. 2. Press and hold the spacebar button while the switch is booting up.
3. If you happen to enter into the "BOOTSTRAP" mode, then:
a. Type the command "BOOT".
b. Press and hold the spacebar once again. It will take you to the "BOOTROM" interface.
4) Execute command "config none" and then reboot.
---------------------------
In switch is running with bootrom 2.0.2.1, config none command may not work.
In this case, you have to download new software from bootrom.
1) TFTP server should be connected to mgmt port
2) To configure Ip address " configip ipaddress gateway
3) type via CLI: download image
{NOTE: ipaddress is TFTP server; filename is XOS image being downloaded}.
------------------------------
If you have admin access of switch then you could execute command "unconfigre switch all" to remove all the configuration from switch.