we commonly used command : (depends on IOS you to check the commands)
#erase nvram - For delete all files in nvram.
#erase ?
/all Erase all files(in NVRAM)
const_nvram: Filesystem to be erased
ics-const_nvram: Filesystem to be erased
ics-nvram: Filesystem to be erased
nvram: Filesystem to be erased
revrcsf: Filesystem to be erased
slave-ics-const_nvram: Filesystem to be erased
slave-ics-nvram: Filesystem to be erased
slaveconst_nvram: Filesystem to be erased
slavenvram: Filesystem to be erased
slavercsf: Filesystem to be erased
startup-config Erase contents of configuration memory
sw1-slot5-const_nvram: Filesystem to be erased
sw1-slot5-nvram: Filesystem to be erased
sw1-slot6-const_nvram: Filesystem to be erased
sw1-slot6-nvram: Filesystem to be erased
sw2-slot5-const_nvram: Filesystem to be erased
sw2-slot5-nvram: Filesystem to be erased
sw2-slot6-const_nvram: Filesystem to be erased
sw2-slot6-nvram: Filesystem to be erased
#erase startup-config - Erase contents of configuration memory
other reference :
https://www.cisco.com/c/en/us/support/docs/lan-switching/vlan/217969-reset-catalyst-switches-to-factory-defau.html