rm

rm file_name

Description

Removes/deletes an existing configuration, policy, or if configured, core dump file from the system.

Syntax Description

file_name Specifies the name of the configuration, policy file, or if configured, the core dump file.

Default

N/A.

Usage Guidelines

After you remove a configuration or policy file from the system, that file is unavailable to the system. For information about core dump files, see Case-sensitive Filenames.

You cannot remove an active configuration file (the configuration currently selected to boot the switch). To verify the configuration that you are currently using, issue the show switch {detail} command. If you attempt to remove the active configuration file, the switch displays a message similar to the following:

 Error: Cannot remove current selected active configuration file. 

When you delete a file from the switch, a message similar to the following appears:

Remove testpolicy.pol from /usr/local/cfg? (y/N) 

Enter y to remove the file from your system. Enter n to cancel the process and keep the file on your system.

Case-sensitive Filenames

Filenames are case-sensitive. In this example, you have a configuration file named Test.cfg. If you attempt to remove a file with the incorrect case, for example test.cfg, the system is unable to remove the file. The switch does not display an error message; however, the ls command continues to display the file Test.cfg. To remove the file, make sure you use the appropriate case.

Local Filename Character Restrictions

This section provides information about the characters supported by the switch for local filenames.

When specifying a local filename, the switch permits only the following characters:
  • Alphabetical letters, upper case and lower case (A-Z, a-z).
  • Numerals (0-9).
  • Period ( . ).
  • Dash ( - ).
  • Underscore ( _ ).

When naming a local or remote file, remember the requirements listed above.

The memorycard option removes/deletes an existing file on the removable storage device, including core dump files if configured. See the section Internal Memory Card and Core Dump Files for information about core dump files.

Internal Memory Card and Core Dump Files

When you delete a core dump file from the system, that file is unavailable.

When you configure the switch to send core dump (debug) information to the internal memory card, specify the internal-memory option to remove/delete the specified core dump file.

For information about configuring and sending core dump information to the internal memory card, see the configure debug core-dumps and save debug tracefiles memorycard commands.

You can use the * wildcard to delete core dump files from the internal memory card. You can also use the * wildcard to delete all of a particular file type from a removable storage device. Currently running and in-use files are not deleted.

If you configure the switch to write core dump files to the internal memory card and attempt to download a new software image, you might have insufficient space to complete the image download. When this occurs, you must decide whether to continue the software download or move or delete the core dump files from the internal memory. For example, if you have a switch with a removable storage device installed with space available, transfer the files to the storage device. Another option is to transfer the files from the internal memory card to a TFTP server. This frees up space on the internal memory card while keeping the core dump files.

Example

The following example removes the configuration file named Activeb91.cfg from the system:

rm Activeb91.cfg

The following example removes all of the core dump files stored on the internal memory card:

rm /usr/local/tmp/*

On a switch with a removable storage device installed, the following command removes the policy file named test.pol from the removable storage device:

rm /usr/local/ext/test.pol

On a switch with a removable storage device installed, the following command removes all of the configuration files from the removable storage device:

rm /usr/local/ext/*.cfg

History

This command was first available in ExtremeXOS 10.1.

The memorycard option was added in ExtremeXOS 11.1.

The internal-memory option was added in ExtremeXOS 11.4.

Support for USB 2.0 storage devices was added in ExtremeXOS 12.5.3.

Pathname support was added in ExtremeXOS 15.5.1.

Platform Availability

This command is available on the Summit X450-G2, X460-G2, X670-G2, X770, and ExtremeSwitching X440-G2, X620, X690, X870 series switches.