UPDATE! For 9200 when you get to 17.3.x Catalyst 9200, Upgrading IOS-XE Amsterdam 17.3.x (Install Mode)
For the 9300 upgrade procedure! Catalyst 9300 Upgrading IOS-XE 16.6.2 onward (Install Mode)
Want to be part of a monthly newsletter covering Cloud, Digital Transformation, and Web3? Check out Apronomics: December, 2022
If you would like to skip to the code used to upgrade the switch, scroll to Appendix A.
First, check to see what mode your switch is running in. The preferred mode is INSTALL mode. In my case, it is running in BUNDLE mode.
We will switch the running mode of the switch during the upgrade process.

Prepare the switch to accept the new IOS-XE image by freeing up some storage.
Step 1. Remove Unwanted Packages C9200#install remove inactive
Step 2. Copy New Image to Flash
C9200#copy usbflash1:cat9k_lite_iosxexxx.bin flash:


Step 3. Set Boot VariableC9200(config)#boot system flash:packages.conf
C9200(config)#end
C9200#wr
C9200#show boot system

Step 4. Software Install Image to Flash
C9200K#install add file flash: cat9k_lite_iosxexxx.bin activate commit

After hitting ‘y’, you will be asked to confirm that you have changed the boot config to packages.conf. You should have done this in Step 3.

Confirm by hitting ‘y’. Your screen will produce a similar output and requires a reload.

It will take a couple of minutes to reload. After the reload, you can confirm your running mode, version and pkg files are in your flash directory.
Step 5. Verify New Packages and Image after reload
C9200#dir flash:*.pkg

Step 6. Check Version and New Bootloader C9200#show version
C9200#show boot

Note: Previously the 9200 was running in BUNDLE mode. After the reload, it is running in INSTALL mode.

Step 7. Clean upC9200#install remove inactive


Hope that this helps.
Mike
Appendix A
Step 1. Remove Unwanted Packages
C9200K#install remove inactive
Step 2. Copy New Image to Flash
C9200K#copy usbflash1:cat9k_lite_iosxexxx.bin flash:
Step 3. Set Boot Variable
C9200K(config)#boot system flash:packages.conf
C9200K (config)#end
C9200K#wr
C9200K#show boot system
Step 4. Software Install Image to Flash
C9200K#install add file flash: cat9k_lite_iosxexxx.bin activate commit
Step 5. Verify New Packages and Image after reload
C9200K#dir flash:*.pkg
Step 6. Check Version and New Bootloader
C9200K#show version
C9200K#show boot
Thank you so much
LikeLiked by 1 person
You’re welcome! Glad it helped.
LikeLiked by 1 person
Thanks for step by step Instruction. It helps
LikeLike
You’re welcome Mohammad!
LikeLike
Hi,
Great article!!!
Any idea how Cisco would remove unwanted packages. I mean what is mechanism? Is it mandatory to execute this command in beginning What if new IOS does not goes well and this command already removed unwanted packages.
LikeLike
Hi, thanks for the support!
The ‘install remove inactive’ will never remove the image that the switch is currently booted to. This command is simply a macro. You can still delete the image from flash manually.
LikeLike
Thanks !! Wish Cisco had direction like this on their site !!!!!!!!
LikeLiked by 1 person
You’re awesome for this!!
LikeLiked by 1 person
Thank you for this!! Straight to the point!
LikeLiked by 1 person
That was brilliant, very concise. Thanks Mike!
LikeLike
todo funciono a la perfección.. muchas gracias
LikeLike
Great Thankyou…
LikeLike
so I have a bunch of 9500/9300/9200L coming into the environment with all kinds of images, I am looking on how to automate the image upgrade but it just seems that there’s so many variables, INSTALL MODE/BUNDLE MODE [some have no mode now on 17.x?], Is there a document somewhere that shows, from 16.x and onward use this method to ugprade, before that use this other method, or is there a default method?
LikeLike
Hi Ed, I wouldn’t over think things here. Most if not all images are shipping with Install Mode on Cat9Ks. There is only one new command in 17.x. you can review the proceeedure below. In regards to automating the upgrades, open source tools like Ansible and Python. The alternative is Cisco DNA Center if it’s in your environment. I’m not aware of the “no mode” you mentioned. Could you post the source of that information for me to review?
17.x upgrade – https://apronets.com/2021/08/31/catalyst-9200-upgrading-ios-xe-amsterdam-17-3-x-install-mode/
LikeLike
After doing this, do we need to re-configure the switch or is this done in a step where I didn’t notice?
LikeLike
Hi!
As long as you save your running-config to startup-config there is not need to “reconfigure.”
LikeLike
Hi
C9200K#install add file flash: cat9k_lite_iosxexxx.bin activate commit
What if I don’t want it to RELOAD at that time, but later. Is it possible?
LikeLike
Hi Basir,
Yes, It’s possible to defer a reload. You will want to remove the ‘commit’ key word Step 4. of the syntax. So it should read as the below.
Step 4. Software Install Image to Flash
C9200K#install add file flash: cat9k_lite_iosxexxx.bin activate
When you want to initiate the upgrade/reload you’ll execute the commit command
C9200K#install commit
LikeLike
Thank you very much for the reply. I will test it tomorrow
LikeLike