Archiving and deleting IOS images

I recently had the need to upgrade the IOS on a Cisco switch (think it was a 3750). As usual, the flash was too small so I needed to remove (and archive/save) the old IOS before putting the new one on. A lot of the images these days include HTML and other things, so are contained in folders rather than a single file. So, how do you take a backup of the image, delete it, and install the new one, without doing each file individually?

It used to be as simple as

copy flash:imagename.bin

Thankfully it’s no more difficult to use the archive functionality, just some new commands to learn.

To archive the files to an FTP server, use:

archive tar /create flash:directoryname

To delete all of the files, including the directory, use:

delete /force /recursive flash:<directory name>

And to copy it back on to the device, and unarchive it at the same time:

Archive tar /xtract flash:

Leave a Comment

Your email address will not be published.

Scroll to Top