Delete files

4

Run the delete [ /unreserved ] [ /quiet ] { filename | devicename } [ all ] command to delete a specified file from the storage medium.

# Remove a file to the recycle bin. The occupied storage space is not released.
delete test.txt
Info: Are you sure to delete flash:/test.txt? [Y/N]: y
# Delete a file permanently and release the occupied storage space. The file cannot be restored after being deleted. Exercise caution when deciding to delete it.
delete /unreserved test.txt
Warning: The file flash:/test.txt cannot be recycled. Continue? [Y/N]: y# Delete a file permanently without the need of any confirmation and release the occupied storage space. The file cannot be restored after being deleted. Exercise caution when deciding to delete it.
delete /unreserved /quiet test.txt
Info: Unreserved deleting file flash:/test.txt...Done.

Other related questions:
Delete files
Run the delete [ /unreserved ] [ /quiet ] { filename | devicename } [ all ] command to delete a specified file from the storage medium. # Remove a file to the recycle bin. The occupied storage space is not released. delete test.txt Info: Are you sure to delete flash:/test.txt? [Y/N]: y # Delete a file permanently and release the occupied storage space. The file cannot be restored after being deleted. Exercise caution when deciding to delete it. delete /unreserved test.txt Warning: The file flash:/test.txt cannot be recycled. Continue? [Y/N]: y# Delete a file permanently without the need of any confirmation and release the occupied storage space. The file cannot be restored after being deleted. Exercise caution when deciding to delete it. delete /unreserved /quiet test.txt Info: Unreserved deleting file flash:/test.txt...Done.

How to delete files
Run the delete [ /unreserved ] [ /quiet ] { filename | devicename } [ all ] command to delete specified files including system files, configuration files, patch files, license files, and log files from a storage medium. Delete a file from the storage medium. delete test.txt Delete flash:/test.txt?[Y/N]:y Info: Deleting file flash:/test.txt...succeeded. NOTE: The actual output information may differ from the preceding information. The all parameter is supported only in a stack. If you specify the all parameter, you can delete all the files in the corresponding directories on all member devices in a batch. Do not delete running version files (including system software, patch files, web page files, and configuration files) in the CLI. You can use the BootROM menu to delete running version files. After a version file is deleted, the device cannot restart using the version file. Exercise caution when you delete a version file. Log files are stored in the logfile or syslogfile directory of the flash memory. You can access the logfile or syslogfile directory and then delete log files, or directly delete log files from the absolute path of the flash memory. # Access the logfile directory and then delete log files. cd logfile/ delete logfile-2013-01-24-09-15-03.zip Delete flash:/logfile/logfile-2013-01-24-09-15-03.zip?[Y/N]:y Info: Deleting file flash:/logfile/logfile-2013-01-24-09-15-03.zip...succeeded. # Delete log files from the absolute path of the flash memory. delete flash:/logfile/logfile-2013-01-24-09-15-03.zip Delete flash:/logfile/logfile-2013-01-24-09-15-03.zip?[Y/N]:y Info: Deleting file flash:/logfile/logfile-2013-01-24-09-15-03.zip...succeeded.

Deleting the configuration file from an S series switch
When an S series switch (except the S1700) is in running state, the configuration file in the flash memory or CF card is protected as a system file and cannot be deleted using the delete command. You can use one of the following methods to delete the configuration file: 1. For an S series switch running V100R003 or a later version, run the following commands to delete the configuration file: system-view [HUAWEI] undo startup saved-configuration //Delete the startup configuration file of the switch from the storage device. [HUAWEI] quit delete //Delete the configuration file. 2. For an S series switch running V100R005 or a later version, or an E series switch, run the following commands to delete the configuration file: reset saved-configuration //Delete the startup configuration file of the switch from the storage device. delete //Delete the configuration file. 3. Delete the configuration file in the BootROM menu. a. Run the reboot command. After the switch restarts, press Ctrl+E (only supported by E series switches and some S series switches) or Ctrl+B to enter the BootROM menu. Enter the default password. b. Press Ctrl+Z to enter the hidden menu and choose Delete file from Flash to delete the configuration file from the flash memory. c. Select 6. Reboot to restart the switch. Note: After the configuration file of a switch in use is deleted, the switch configuration is lost if you do no run the save command to save the configuration file before restarting the switch. Exercise caution when deleting the configuration file.

How to delete the files in the recycle bin
Using the reset recycle-bin [ filename ] command, you can delete the files in the recycle bin. The files in the recycle bin cannot be restored after being deleted.

Permanently deleting files or releasing storage space (of the flash or SD card) on the firewall
The method of permanently deleting files from the firewall to release the storage space is as follows: 1. Run the reset recycle-bin[ filename ] command to permanently delete a file in the Recycle Bin. If you do not specify the file name, all files in the Recycle Bin are deleted. 2. Run the delete/unreserved + file name command to directly and permanently delete a file.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top