cisco IOS — Deleting a Specified Configuration File

Deleting a Specified Configuration File To delete a specified configuration on a specific flash device, complete the task in this section: Procedure Managing Configuration Files Deleting a Specified Configuration File Command or Action Purpose Step 2 erase nvram Example: Device# erase nvram Clears the contents of your startup configuration. Note For all platforms except the Class A Flash file system platforms, this command erases NVRAM. The startup configuration file cannot be restored once it has been deleted.

On Class A Flash file system platforms, when you use the erase startup-config EXEC command, the device erases or deletes the configuration pointed to by the CONFIG FILE environment _ variable. If this variable points to NVRAM, the device erases NVRAM. If the CONFIG FILE environment variable specifies _ a flash memory device and configuration filename, the device deletes the configuration file. That is, the device marks the file as “deleted,” rather than erasing it. This feature allows you to recover a deleted file. Command or Action Purpose Step 1 enable Example: Device> enable Enables privileged EXEC mode. • Enter your password if prompted. Step 2 delete flash-filesystem:filename Example:

Device# delete usbflash0:myconfig Deletes the specified configuration file on the specified flash device. Note On Class A and B Flash file systems, when you delete a specific file in flash memory, the system marks the file as deleted, allowing you to later recover a deleted file using the undelete EXEC command. Erased files cannot be recovered. To permanently erase the configuration file, use the squeeze EXEC command. On Class C Flash file systems, you cannot recover a file that has been deleted. If you attempt to erase or delete the configuration Managing Configuration Files 29