When you delete a file from boot flash memory, the system marks the file as deleted. Deleted files cannot be recovered. The boot flash memory is not released after the image file has been deleted, only the image file is marked as deleted.
Caution - When deleting files from memory, be careful not to delete all the system images. You should always retain one known good image as a backup image.
To delete a file, use the delete command. The following example demonstrates how a specified image file is deleted using the delete command.
Router# dir
Directory of bootflash:/
1 -rw- 3153784 cat2948g-in-mz.old
2 -rw- 3153932 cat2948g-in-mz
16777216 bytes total (7315372 bytes free)
Router# delete cat2948g-in-mz.old
Delete filename [cat2948g-in-mz.old]?
Delete bootflash:cat2948g-in-mz.old? [confirm]
Router# dir
Directory of bootflash:/
2 -rw- 3153932 cat2948g-in-mz
16777216 bytes total (7315372 bytes free)