Improve company productivity with a Business Account.Sign Up


Remove superseded updates in Windows 7

Published on
6,232 Points
1 Endorsement
Last Modified:
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space.

w60 means Windows Vista or Windows Server 2008.
w61 means Windows 7 or Windows Server 2008 R2.

There are various guides found on the internet on how-to integrate updates into Windows installation media using dism.
This article is a post-integrate how-to to this numerous articles.
This article is addressed to users, who are comfortable using dism to mount, update, manage and unmount Windows Image files for deployment of Windows Systems.
So mounting and dismounting images is intentionally left out.

Administrators often include windows update packages into their deployment images to save time when deploying.
In Windows 8 dism.exe has built-in command-line extensions to remove superseded updates from Windows 8 image files.
Earlier versions of Windows do not have this feature.
So when you integrate packages into a windows installation media (w60 or w61), superseded or outdated packages reside in the deployment image and use unneccessary space. This guide shows how to list and remove superseded packages from the command-line or by batch.

Short description for what you have to do before:
- Download Windows Updates for Windows (w60 or w61).
  Best practice is using wsus offline update.
- Mount Windows installation media.
- Apply packages to the mounted image.

The listings below offers two options.
The first option (offline) is adressed to manage superseded packages of an already mounted Windows (w60, w61) image.
The second option (online) is addressed to manage superseded packages on an online Windows (w60, w61) system.

Only tested for Win7:
Assuming image is mounted on c:\dism\mount or use online system.
Open elevated command prompt:

List superseded updates from command-line (Tip: Set command windows size > 150):

rem offline
dism /image:c:\dism\mount /get-packages /format:table /english | find /i "Superseded"

Open in new window

rem online
dism /online /get-packages /format:table /english | find /i "Superseded"

Open in new window

Write list of superseded updates to textfile:

dism /image:c:\dism\mount /get-packages /format:table /english | find /i "Superseded" > c:\packages.txt
notepad.exe c:\packages.txt

Open in new window

dism /online /get-packages /format:table /english | find /i "Superseded" > c:\packages.txt
notepad.exe c:\packages.txt

Open in new window

Remove all superseded updates:
Write "remove-superseded.cmd" with following code.
Please regard escape (^) before pipe (|) in batch.
@echo off
set mnt="c:\dism\mount"
for /f %%i in ('dism /image:%mnt% /get-packages /format:table /english ^| find /i "Superseded"') do (
echo %%i
dism /image:%mnt% /remove-package /packagename=%%i

Open in new window

@echo off
for /f %%i in ('dism /online /get-packages /format:table /english ^| find /i "Superseded"') do (
echo %%i
dism /online /remove-package /packagename=%%i

Open in new window

Open elevated command window and run "remove-superseded.cmd".
Now, since all superseded updates are removed, the deployment image will be smaller then before.

Short description for what you can do afterwards:
- Unmount image using dism. Don't forget to use the commit option.
- Compress image using imagex. (ADK or WAIK is needed).

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Join & Write a Comment

Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month