Try this:
-Power up switch, with terminal connected to console port
-Interrupt POST process BEFORE agent loads (ctrl-C)
pick:
-(i) to initialize config/log flash
then run agent code or reset switch. It will be back to factory defaults.
I just tried this and it worked--I came here looking for a solution, then it just dawned on me. I don't have another switch with the same software, so I can't stack it.