Cisco Catalyst – %Error Deleting flash:/{name} (Is a directory)

KB ID 0001070 

Problem

cisco switches

Today I was upgrading a Cisco 3750 switch, and needed to free up some space in the flash memory to upload the new system image to. But when I tried to delete the current system file I got this error.

Petes-3750# dir
Directory of flash:/

2 -rwx 796 Mar 7 1993 01:15:49 +00:00 vlan.dat
3 drwx 192 Mar 1 1993 00:17:13 +00:00 c3750-ipservicesk9-mz.122-55.SE5
4 -rwx 5504 May 27 2015 10:23:47 +00:00 private-config.text
85 -rwx 3096 May 27 2015 10:23:47 +00:00 multiple-fs
86 -rwx 2544 Mar 1 1993 00:01:40 +00:00 config.backup
88 -rwx 4020 May 27 2015 10:23:47 +00:00 config.text

15998976 bytes total (2421248 bytes free)
Petes-3750(config-if)#exit

Petes-3750#delete flash:/c3750-ipservicesk9-mz.122-55.SE5
Delete filename [c3750-ipservicesk9-mz.122-55.SE5]?
Delete flash:/c3750-ipservicesk9-mz.122-55.SE5? [confirm]
%Error deleting flash:/c3750-ipservicesk9-mz.122-55.SE5 (Is a directory)

Solution

Well the fact that the file name didn’t have ‘.bin’ on the end of it should have been a clue. Anyway to delete the folder you need to use the force and recursive switches in your delete command, (or you can use rmdir).</p?

Petes-3750#delete /force /recursive flash:/c3750-ipservicesk9-mz.122-55.SE5
Petes-3750#dir
Directory of flash:/

2 -rwx 796 Mar 7 1993 01:15:49 +00:00 vlan.dat
4 -rwx 5504 May 27 2015 10:23:47 +00:00 private-config.text
85 -rwx 3096 May 27 2015 10:23:47 +00:00 multiple-fs
86 -rwx 2544 Mar 1 1993 00:01:40 +00:00 config.backup
88 -rwx 4020 May 27 2015 10:23:47 +00:00 config.text

15998976 bytes total (15981056 bytes free)
Petes-3750#

Related Articles, References, Credits, or External Links

NA

Author: Migrated

Share This Post On