I had to upgrade some old Cisco Catalyst switches to the latest firmware. The problem was that the flash contained the old firmware... and the delete command did not seem to honor the /r/f flags (at least in this old version from the year 2000.)
To clear out the html dir on the Cisco switch:
delete /force /recursive flash:html/*
Assuming my tftp server's IP is 172.18.27.40 and I have a cisco firmware tar file called "c35xx-new-version.tar" in the root of the tftp server, I upgrade like so:
archive tar /extract tftp://172.18.27.40/c35xx-new-version.tar flash:
(or archive tar /xtract tftp://172.18.27.40/c35xx-new-version.tar flash: - depending on version)
(later versions of IOS use the flag /xtract instead of /extract.)
As always, try this at your own risk.