Windows Server 2008/2012 (incl. R2): Uninstall updates while your machine is in reboot loop
We hear many cases where we install windows updates and our client machine/server stuck in reboot loop (reason could be corruption, missing packages etc.) and don’t boot to the desktop normally hence I have come up with the solution for this panic situation and hope it works for you also.
We have a server running with “Windows Server 2012 R2” and we do not have updates installed into it (as mentioned in the below screenshot):
We installed an update “KB2906956” into it:
Now, we have two ways to uninstall this update:
Uninstall it from control panel (location is highlighted):
Uninstall it from WinRE (Windows Recovery Environment). This method can be used if machine is in reboot loop while installing update and not booting to the desktop. Follow below steps to boot into WinRE:
Attach a Disk/ISO to the machine (disk of current OS is preferable) and boot from it.
On the above screen press Shift + F10 and a CMD will open up:
Type Notepad in CMD and press Enter and it will open a notepad for you:
In notepad click on file and open which will open an Open utility for notepad and make sure that your OS drive is visible here and verify the same after seeing its contents:
As per below screenshot we found that in WinRE our OS drive letter has changed from C to E:
Now we can check the installed packages on this machine using the DISM command and we need to use drive letter “E” and command would be “dism /image:e: /get-packages” without quotes:
In the above screenshot we can see that all the packages are showing as Installed however in case of any issue they might show Pending or Failed also and after identification we can remove them from here.
In order to test we will uninstall the update “KB2906956” which was installed on this server.
In order to uninstall that particular update we need to run Dism command “DISM /Image:C: /Remove-Package /PackageName:<name>” with the package name. We will run below command:
DISM /Image:E: /Remove-Package /PackageName:Package_for_KB2906956~31bf3856ad364e35~amd64~~6.3.1.0
After we ran this command this update “KB2906956” uninstalled successfully:
We can again verify whether the update has been uninstalled or not by running command “dism /image:e: /get-packages”(without quotes):
We rebooted this server and found that the update is not even showing in Control Panel: