Technical Anshu
Tutorials Blog
🔄 Update Loop Fix

Windows Update Stuck in a Boot Loop Fix It from WinPE

An update that half-installs and then rolls back on every boot traps the PC in an endless loop. The exit is to cancel the pending servicing actions from outside Windows - WinPE and one DISM command do exactly that.

✍️ Technical Anshu🪟 Windows 10 / 11⏱️ 8 minute read
🎥 Full video - a boot-looping Windows rescued offline inside the WinPE CMD Toolkit

The pattern is always the same: the PC shows Working on updates, fails, restarts, shows Undoing changes made to your computer, and then tries the whole thing again forever. Inside Windows, the update is stuck in a pending state - every boot attempts to finish it before anything else can run. You cannot fix that from a system that never reaches the desktop, but from WinPE you can order the servicing stack to roll back the pending actions and let Windows boot clean. Older forum tricks like deleting pending.xml are covered honestly in Step 4 - including why they are not the first move.

What the loop looks like on screen
Undoing changes made to your computer
...then the PC restarts, tries the same update again, fails again, and returns to this screen. The loop never reaches the desktop.
If you have seen this screen three times in a row, the update is stuck pending - further restarts will not fix it. Time to work from WinPE.
1

Boot WinPE and Confirm the Windows Letter

All offline servicing commands address the Windows partition by its WinPE letter, so confirm it before anything else:

  1. Boot the WinPE USB and open the CMD Toolkit command prompt as administrator
  2. Run diskpart and list volume, then prove the Windows partition with dir D:\ - it must show Windows, Users and Program Files
  3. This guide uses D:. Every command below takes that letter
2

Revert the Pending Actions with DISM

This is Microsoft's documented offline escape from the loop. It tells the servicing stack to abandon the half-applied changes instead of retrying them at every boot:

  1. Run dism /image:D:\ /cleanup-image /revertpendingactions
  2. Success ends with "The operation completed successfully" - the pending update actions are now marked for rollback at next boot instead of completion
  3. Restart the PC without the USB. The first boot may still show an undoing-changes pass - that is the rollback actually happening. Let it finish without interrupting power
  4. Windows should now reach the desktop. The failed update will be offered again later - Step 5 deals with that
3

Remove the Specific Bad Update Package Offline

If reverting alone is not enough - or you know exactly which update broke the machine - remove that package from the offline image entirely:

  1. List what is installed or pending: dism /image:D:\ /get-packages and look for recent entries with a state of Install Pending or the newest install date
  2. Remove the suspect package by its full name: dism /image:D:\ /remove-package /packagename:Package_for_KBxxxxxxx - the package name must be copied exactly from the list
  3. Reboot and test. Removing the package means Windows Update will offer it again, so handle Step 5 before reconnecting to updates
4

The Truth About pending.xml and SoftwareDistribution

Two famous folk remedies need honest framing, because both are still repeated everywhere:

  1. Deleting or renaming pending.xml (found in D:\Windows\WinSxS) was a Windows 7-era workaround. On modern Windows it can leave the servicing records inconsistent - the store thinks work exists that its instruction file no longer describes. Use DISM revertpendingactions first; treat pending.xml surgery as a last resort on a backed-up system only
  2. Renaming the SoftwareDistribution folder clears the update download cache and history. That helps when updates will not download - it does nothing for a servicing action that is already pending, because the loop is not caused by the cache
  3. Neither trick is in the video's workflow for a reason: the DISM route fixes the actual state instead of deleting the paperwork about it
5

After It Boots - Stop the Same Update Returning Blind

Breaking the loop is half the job. The same update is queued to return, so finish properly once Windows is up:

  1. Run sfc /scannow and a DISM RestoreHealth from inside Windows to repair any damage the failed update left behind
  2. In Settings, pause updates for 1 week - Microsoft frequently re-releases a fixed version of a bad update within days
  3. Check the disk's health before blaming the update entirely: updates fail mid-servicing far more often on disks that are already developing bad sectors
  4. When updates resume, install them one batch at a time so a repeat failure identifies its culprit immediately
🔴 Never cut the power during an undoing-changes pass after reverting. The rollback itself is a servicing operation - interrupting it mid-write is how a recoverable loop turns into a genuinely corrupted store. Plug laptops into mains power before you start and let every pass finish.

🎥 Watch a Boot Loop Rescued in the Full Video

The pending-action revert, the package removal, and the first clean boot afterwards - shown live in the WinPE CMD Toolkit.

▶️ Watch Full Video
❓ Frequently Asked Questions

Will revertpendingactions uninstall all my previous updates?

No. It rolls back only the actions that are stuck in the pending state - typically the one update that never finished. Updates that installed successfully in earlier sessions are untouched.

How many times should I let the loop repeat before using WinPE?

Two or three identical undoing-changes cycles are proof enough. The pending state does not heal itself with more restarts, and every extra cycle is another hard power interruption risk for the disk.

The same update broke my PC twice - should I block it permanently?

Pause first, not block. Most boot-breaking updates are withdrawn or superseded by Microsoft quickly. If the identical KB still fails after a fresh release and a clean SFC and DISM pass, research that KB specifically - a known-issue note usually exists by then.

This guide is based on the Technical Anshu video on fixing corrupted Windows with a custom WinPE CMD Toolkit • Stuck on a step - ask in the video comments and the community will help 🙏