Fix Windows Update Error 0x80240020 (Pending Restart)
You're installing a Windows update and it stalls around 87%, then fails with error 0x80240020. The update wizard doesn't give much detail, just "pending restart conflict". This usually happens when the system detects an incomplete previous update cycle. In many cases, the error 0x80240020 windows update fix is simpler than expected.
One working method to clear the block
Instead of going through multiple steps, start with the most direct approach. This resolved the issue on several Windows 11 machines that showed the same error after a failed cumulative update (KB5147323).
Delete or rename pending.xml
The file C:WindowsWinSxSpending.xml holds state about unfinished operations. When the installer sees this file, it refuses to proceed — that's exactly the fix error 0x80240020 windows 11 scenario.
# Open Command Prompt as Administrator
takeown /f C:WindowsWinSxSpending.xml
icacls C:WindowsWinSxSpending.xml /grant administrators:F
rename C:WindowsWinSxSpending.xml pending.old
After renaming, restart the Windows Update service and try the update again. In some cases you might also need to clear the SoftwareDistribution cache, but renaming pending.xml alone often gets you past the 87% block.
If deleting pending.xml fails due to permission errors or the file regenerates, the next logical step is to reset CBS state manually (Method2). That's the error_path: Method1 fails → Method2. A full system restart before retrying also helps.
Why does error 0x80240020 appear at 87%?
The core conflict is that CBS (Component Based Servicing) and the Windows installer detect a pending.xml state indicating an incomplete previous update cycle. Windows 10 often ignores pending flags and allows installation anyway, but Windows 11 strictly blocks it until a restart completes. You might wonder why 0x80240020 happens during update – it's essentially the system saying "you owe me a reboot before I do anything new".
The update may stall around 87% before failing because that's when the installer attempts to finalize file operations and hits the pending lock. This is a known behavior with cumulative updates that include driver or registry changes.
How to verify it worked
- The update passes 87% without failure and continues to 100%
CBS.logshows no pending operations (search for "pending" – should return nothing recent)- Windows Update history shows successful installation
Things to avoid
- Do not ignore required system restart – always reboot when Windows tells you to
- Avoid installing updates during pending state – check for pending.xml first
- Do not delete CBS files incorrectly – only rename pending.xml, never delete the entire WinSxS folder
If you're still stuck, the manual install via Microsoft Update Catalog (KB5147323) is a reliable fallback. But in most deployments, cleaning up the pending.xml file gives you a clean path forward without reinstalling anything.
📖 Related Guides (Same Category)
windows update error 0x80070002 fix
Learn how to fix Windows Update error 0x80070002 quickly. Proven working methods to resolve missing file and cache issues in 2026.
windows update error 0x800f0831 fix
Resolve Windows Update error 0x800f0831 quickly. Working 2026 guide to fix missing package and install updates successfully.
windows update error 0x80070003 fix
Resolve Windows Update error 0x80070003 quickly. Working 2026 guide to fix path not found and installation errors in Windows.
🛠️ Recommended Tools for Windows Update Errors
🔗 Explore More in Other Categories
🔥 Recommended for You
windows installation hangs fix
Resolve Windows installation hangs issue with working fixes for Windows 10 and 11.
windows install cannot proceed fix
Learn how to fix Windows installation cannot proceed issue with working solutions for Windows 10 and 11.
windows install crash fix
Resolve Windows install crash issue with working solutions. Complete 2026 guide for setup crash errors.