Wednesday, May 12, 2021

Uninstall Windows Update with Command Prompt

Use of WUSA command tool to uninstaill

If you are unable to remove an update from the Settings app or Control Panel, you can also use the Windows Update Standalone Installer, or wusa.exe, command line program to uninstall Windows updates.

In order to use this tool, you will need to know the KB number of the Windows update. To uninstall an update, open an Elevated Command Prompt (admin) and then type the following command after replacing the KB ID with the one that you wish to uninstall: wusa /uninstall /kb:[id]

Ex: #wusa /uninstall /KB:4023057 

Use DISM command tool to repair

When Safe Mode, Last Known Working Config, Startup Repair, System Restore are not helpful, try Deployment Image Servicing and Management (DISM).

DISM command with RestoreHealth option

If there are problems with the system image, you can use DISM with the RestoreHealth option to scan and repair common issues automatically.

From the System Recovery Command Prompt run the following command:
# dism /online /get-packages

This will produce a list of installed updates and packages. They will look like this:
           Package Identity: Package_for_KB978262~31bf3856ad364e35~x86~~6.1.1.0
           State: Installed
           Release Type: Security Update
           Install Time: 2/11/2010 1:01 PM

Find the most recent one and then make a note of the package identity.
Then run the following command:
# dism /online /remove-package /PackageName:Package_for_KB978262~31bf3856ad364e35~x86~~6.1.1.0
           Note: Name of update is from previous step which may vary.

You will get a status of the removal until it is complete. Then reboot your PC.
You will want to start with the most recent and remove them one at a time to find the problem update.

Reference:
[1] https://www.windowscentral.com/how-use-dism-command-line-utility-repair-windows-10-image