Uninstall patch using SCCM
Question
Hello,
I am trying to uninstall a specific patch from Windows 10 20H2 and Windows Server 2019 using the below command but it’s not working.
C:WindowsSystem32wusa.exe /uninstall /kb:<KB_Number> /quiet /norestart
It’s working without /quiet parameter but to uninstall from SCCM I need a silent switch.
I checked with DISM command as well but all the patches showing in control panel are not showing using DISM command. Also, when I tried to run the below command to uninstall KB5015807 (assuming it could be related to it from the installed date) then it fallback to KB5011487 and the same happened with KB5013624.
DISM.exe /Online /Remove-Package /PackageName:Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.1826.1.8 /quiet /norestart
So please help me with the correct way to uninstall patch using SCCM.
Also, would like to know is it possible to uninstall patch where “Uninstall” option is not showing in Control Panel ->Installed Updates.
Below are snaps for ref.
Answers ( 3 )
Hello,
Can someone help me to understand below two points that I asked about earlier?
1. How to identify the KB name which is not showing in the package name using the above DISM command.
2. With the above PS command for KB removal, for some KBs it is giving output as “Permanent package cannot be uninstalled”; so does it mean we cannot uninstall/roll back such updates?
Thank you in advance.
Hi Prayag,
Thanks for reaching HTMD.
Can you try with the below PowerShell script? I will suggest run the script manually and check if it is successful then apply on all the systems.
Command to locate the list of kb/packages
dism /online /get-packages | findstr /i “package_for”
Command to remove the kb/packages
Get-WindowsPackage -Online -PackageName “” |Remove-WindowsPackage -Online -NoRestart -Verbose
Hello Debabrata,
Thank you for your reply.
This is a great help for knowing the patch uninstallation command. I tested it on 1 system so it works. Will do further testing of the same.
Request you to help me to understand how to identify the KB name which is not showing in package name using the above DISM command.
Also for some KBs it is giving output as “Permanent package cannot be uninstalled” during uninstallation, so it means we cannot uninstall/roll back such updates?