Tips and Tricks Windows

Fix all Update (KB) related issue via DISM

There might be a problem with an update and you need to get rid of it, that’s the reasons I write this little guide here to show what you really can remove a specific update, even if it’s not listed in the ‘view installed update list’. Microsoft already gave us from the beginning to ability to uninstall the updates and this process can be easy when you use the Deployment Image Servicing and Management (DISM.exe) tool – which comes included in every Windows 7 or a higher version.


The article here addresses the issue how to get rid of a specific KB (Update) and shows some more DISM commands to fix broken Windows online images. With a few tricks in the Windows Deployment Image Servicing and Management command utility, admins can solve some of the most common Windows 10 update problems plaguing their users.

DISM is really powerful and is well documented in the official Microsoft docs, which you can find right here. There is an unofficial GUI utility for it in case you’re not really a friend of the command line which is called DISM++ developed by a Chinese guy since several years but it’s not really needed because the command line parameters are very easy to understand and as already mentioned, well documented,

Identify the installed cumulative updates (KB)

First, we need to find the list of packages installed on the PC with the issue by performing this command

dism /online /get-packages /format:table

Alternative you can use this to get a better view

dism /online /get-packages /format:table > patches.txt

This will generate a list called ‘patches.txt’ were you can see all installed updates or hotfixes.

Remove the problematically KB

Let’s say you want to remove the Package_for_KB2870699~31bf3856ad364e35~amd64~~ package, then use the following command to silently remove it:
DISM.exe /Online /Remove-Package /PackageName:Package_for_KB2870699~31bf3856ad364e35~amd64~~ /quiet /norestart
You could use this command in a batch script in case you want to remove more than one update, the hardest process is to find the exact name but with the given method you just need to look at KB number to identify which package you need to remove. If you want to get rid of a hotfix this is a little bit more complicated because there is no specific identification given and the names are random, so before you install a hotfix, ensure you make a list of the currently installed updates and compare it against the list after you installed the hotfix.

Other useful commands

Displays a basic Help and stores it into a file

dism /? dism /mount-wim /? >C:\dismhelp.txt

Display a list of all the Windows images contained:

dism /get-wiminfo /wimfile:

Mount an Windows image:

dism /mount-wim /wimfile: /index:1 /mountdir:c:\mount

Image status/cleanup:

dism /get-mountedwiminfo if okay remount the image dism /remount-wim /mountdir: dism /cleanup-wim

Add all drivers from a folder:

dism /image:c:\mount /add-driver /driver:c:\drivers

Add all drivers from top-level folders and all folders below:

dism /image:c:\mount /add-driver /driver:c\drivers /recurse

Add specific driver:

dism /image:c:\mount /add-driver /driver:c:\drivers\mydriver.inf

Add unsigned driver:

dism /image:c:\mount /add-driver /driver:c:\drivers\mydriver.inf /forceunsigned

List of all drivers:

dism /image:c:\mount /get-drivers dism /image:c:\mount /get-drivers /format:table

Get a specific driver info:

dism /image:c:\mount /get-driverinfo /driver:c:\drivers\usb\usb.inf

Remove a driver:

dism /image:c:\mount /remove-driver /driver:oem1.inf

Remove multiple drivers:

dism /image:c:\mount /remove-driver /driver:oem1.inf /driver:oem2.inf

For large drivers (eg nVidia)
dism /image:c:\mount /add-driver /driver:c:\drivers\nvidia /forceunsigned /scratchdir:c:\temp dism /image:c:\mount /add-driver /driver:c:\drivers\ /recurse /scratchdir:c:\temp

Add specific Packages:

dism /get-wiminfo /wimfile: dism /mount-wim /wimfile: /name:”Windows 7 HomeBasic” /mountdir:c:\mount dism /image:c:\mount /add-package /packagepath:c:\packages\ /packagepath:c:\packages\ dism /unmount-wim /mountdir:c:\mount /commit

Add an MSU update (replace the XXXXX with your KB number of the update you like to install)

dism /image:c:\mount /add-package /packagepath:c:\updates\xxxxx.msu

Add all updates from a folder:

dism /image:c:\mount /add-package /packagepath:c:\updates

Manage Windows features:

dism /online /get-features | more dism /online /enable-feature /featurename: dism /online /disable-feature /featurename:<add-you-feature-you'll-like-to-remove-here>

Fix SFC problems and scan your image for problems:

DISM /Online /Cleanup-Image /RestoreHealth

There are a lot of more useful command lines which you could use but I think these are the most used ones which help to fix or modify your image.

Final Words

A small utility called DISM is really powerful and it helps to fix a lot of troubles, it’s not hard to use, just ensure you start DISM via administrative privileges to get access to everything and then you can repair most of all Windows issue if you aware of the right parameters, of course, some situations are not fixable but these are normally really rare and most of the time the user itself caused such bigger problems by himself.

Fixing troubles and modding an image is more or less easily possible with DISM and it’s really a lifesaver and a swiss knife in several situations.