Friday, 9 August 2013

IOS Tip: %Error deleting flash0:xxxx (Can't delete a directory that has files in it)

Have you seen this error before? Cisco IOS doesn't allow deletion of directories which contain sub-directories/files. This won't work with "delete" or "rmdir" command.

2951-router#delete /force flash0:CME9.1.0GUI
%Error deleting flash0:CME9.1.0GUI (Can't delete a directory that has files in it)

To make it working, you need to use "/recursive" keyword with "delete" command. It will start deleting using bottom-top approach from most deeper file in reverse direction..

2951-router#delete /force /recursive flash0:CME9.1.0GUI


  1. Hi
    thank you for very useful blog .
    i have question
    We have need call duration limit on CME for ISDN or H323 . can any IOS command or script or EEM support this feature ?

  2. Thank you!!!! i was in the process of deleting the files on our UC560 one at a time....
    F*$# THAT! :) Saved us so much time. Thank you Mohammed Al Baqari :)