07-06-2019 05:23 AM
Hi Geeks,
I have a crashed 2960x switch and I am trying to upgrade the ios, when transferring file thru console flash is full.
I cannot delete file or directory.
below are the errors I got when deleting.
switch: rmdir flash:/c2960x-universalk9-mz.150-2a.EX5
Are you sure you want to remove "flash:/c2960x-universalk9-mz.150-2a.EX5" (y/n)?
y
Directory "flash:/c2960x-universalk9-mz.150-2a.EX5" not removed -- directory not
empty
switch: delete /force flash:/c2960x-universalk9-mz.150-2a.EX5
Are you sure you want to delete "/force" (y/n)?y
File "/force" not deleted -- no such device
switch: delete /force /recursive flash:/c2960x-universalk9-mz.150-2a.EX5/
Are you sure you want to delete "/force" (y/n)?y
File "/force" not deleted -- no such device
Are you sure you want to delete "/recursive" (y/n)?y
File "/recursive" not deleted -- no such device
Are you sure you want to delete "flash:/c2960x-universalk9-mz.150-2a.EX5/" (y/n)
?y
File "flash:/c2960x-universalk9-mz.150-2a.EX5/" not deleted -- is a directory
switch: delete <c2960x-universalk9-mz.150-2a.EX5>
Are you sure you want to delete "<c2960x-universalk9-mz.150-2a.EX5>" (y/n)?y
File "<c2960x-universalk9-mz.150-2a.EX5>" not deleted -- no such device
Anyone knows the exact command for this.
Cheers!
07-06-2019 06:22 AM
You should be able to delete the file by typing;
delete flash:/c2960x-universalk9-mz.150-2a.EX5
Does the 'dir' command, when in the flash directory show that your flash is full?
07-06-2019 05:30 PM
07-06-2019 10:33 AM - edited 07-06-2019 10:40 AM
Some switches do put ios inside of a folder on flash. show boot or show system boot to see ios location. based on output, u may have something like this:
boot flash:/c2960x-universalk9-mz.150-2a.EX5/c2960x-universalk9-mz.150-2a.EX5.bin
- ios ,bin is inside of a folder , usually same name as ios .bin
"directory not empty" --this error means u have file or files inside of a directory. u must go to directory first, then delete all files inside, then exit and remove directory.
cd - move u to folder, so cd flash:/c2960x-universalk9-mz.150-2a.EX5
then do dir to see what files are in there, then u can delete them, I think delete *.* should work to remove all files.
all those are Linux based commands
cd - moves to folder
pwd - show u current location /directory.
Regards, ML
**Please Rate All Helpful Responses **
07-06-2019 05:34 PM
07-07-2019 04:48 PM
02-21-2022 05:07 AM
we have exact same problem. I tried most of the answers above however still unable to delete it.
02-21-2022 01:45 PM
Delete what?
07-06-2019 06:48 PM
@jnd23 wrote:
switch:
Look at the prompt. It is a ":" and not a "#". This means the switch is in ROMMON. If you want to delete everything in the flash, the command to use is "format flash:".
If you want to delete a file, in ROMMON, the command is "delete flash:c2960x-universalk9-mz.150-2a.EX5/filename.bin".
Wildcards are not accepted.
07-06-2019 08:19 PM
07-06-2019 09:43 PM
@jnd23 wrote:
formatted the flash and now transferring the new ios via console xmodem.
How quaint.
Look at the appliance. Can you see the USB port? It is a lot faster to transfer the IOS file from a thumb drive to the appliance via USB.
The USB port will even allow booting a USB even from ROMMON using the command "boot usb0:filename.bin".
07-06-2019 10:40 PM
10-28-2024 11:18 PM
Hi jnd23
I believe it is resolved, but you can use the command:
Switch# delete /force /recursive flash:/c2960x-universalk9-mz.150-2a.EX5
Have a nice day
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide