Deleting Files from Flash
Problem
You want to erase files from your router’s flash.
Solution
To delete all of the files from your router’s flash memory, use the erase command:
Router1#eraseErasing the slot1 filesystem will remove all files! Continue? [confirm]slot1:<enter>Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased Erase of slot1: complete Router1#
Tip
Not all router types support the erase command.
You can remove individual files from the router’s flash memory with the delete command:
Router1#deleteDelete filename [c3620-ik9s-mz.122-13.bin]?slot1:c3620-ik9s-mz.122-13.bin<enter>Delete slot1:c3620-ik9s-mz.122-13.bin? [confirm]<enter>Router1#
Discussion
As we have indicated, there are two ways to delete files from flash, depending on the type of router. The difference arose because Cisco routers use three different kinds of filesystems, called Class A, Class B, and Class C. Table 1-2 shows the filesystems that Cisco’s most common routers use.
Table 1-2. Supported filesystems of common Cisco routers
| Router type | Filesystem type |
|---|---|
| 7000 (RSP) | Class A |
| 7500 (RSP 2 ,4, and 8) | Class A |
| 12000 | Class A |
| Route Switch Module (RSM) | Class A |
| 1600 | Class B |
| 2500 | Class B |
| 3600 | Class B |
| 4000 | Class B |
| AS5300 | Class B |
| AS5800 | Class C |
| 7100 | Class C |
| 7200 | Class C |
Table 1-3 lists some of the different filesystem commands, their meanings, and the filesystems that they work with.
Table 1-3. Filesystem commands and their meanings
| Command |
|---|