Sometimes, Windows may repeatedly ask you to restart your computer after an update, showing the “Restart required, Pending restart” message even after multiple reboots. This usually happens when an update installation fails, leaving the system in a pending or incomplete state.
To resolve this issue, follow these steps:
Step 1: Check for Pending Updates
Open PowerShell as Administrator, and run the following command to identify update packages that are stuck in a pending state:
dism /online /get-packages /format:table | Select-String “Pending”
Alternatively, for a cleaner output:
Get-WindowsPackage -Online | Where-Object { $_.PackageState -like ‘*Pending*’ }
If any updates show a pending status after rebooting, you may need to cancel them manually.
Step 2: Boot into Windows Recovery
Run the following command to reboot directly into Windows Recovery Environment (WinRE):
shutdown /f /r /o /t 0
Alternatively, use a LiveCD, DaRT disk, or Windows installation media to boot into recovery mode.
Step 3: Cancel Pending Updates
While in recovery mode, open Command Prompt and enter the following command to cancel all pending Windows Update actions:
DISM /image:C:\ /ScratchDir:C:\ /cleanup-image /RevertPendingActions
Ensure C:\ is your system drive; adjust if necessary.
Step 4: Manually Remove Update Files (If Needed)
If DISM doesn’t work, manually delete the pending update files:
del C:\Windows\WinSxS\pending.xml
del C:\Windows\WinSxS\cleanup.xml (if it exists)
del C:\Windows\SoftwareDistribution\Download\*.*
This clears out temporary update data and pending actions.
Step 5: Remove Registry Entries
Launch Registry Editor (regedit).
Load the offline Software registry hive from:
C:\Windows\System32\config\Software
Go to:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager
Delete the key: PendingFileRenameOperations
Save and unload the hive: File → Unload Hive. Restart the computer.
Step 6: Verify and Repair System Files
After rebooting, use the following commands in Command Prompt (Admin) to check system health:
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
These commands verify system integrity and fix any corrupted files caused by incomplete updates.
By following these steps, you should be able to break out of the Windows Update “Pending Restart” loop and restore normal update functionality.