Cause #1: Corrupted Update Cache or Missing Files (Most Common)
Nine times out of ten, this error pops up when Windows Update can't find the files it needs because the cache got borked. This happens a lot after a failed update — maybe your PC lost power mid-download, or you killed the update when it was hanging. I had a client last month whose entire update history was stuck because the SoftwareDistribution folder was full of junk from three failed attempts.
The fix is to clear that cache and let Windows rebuild it. Don't worry, it's safe. Here's the sequence:
- Open Command Prompt as administrator. Hit Start, type
cmd, right-click it, and pick "Run as administrator". - Stop the update services. Run these four commands one at a time:
net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver
- Now delete the cache. In the same window:
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
ren C:\Windows\System32\catroot2 Catroot2.old
Renaming instead of deleting is smarter. If something goes weird, you can always rename back. After that, restart the services:
net start wuauserv
net start cryptSvc
net start bits
net start msiserver
Close the window and try Windows Update again. This clears out corrupted downloads and forces a fresh start. Works more often than not.
If that doesn't do it, run the built-in system file checker to repair any missing or damaged system files. Same admin Command Prompt:
sfc /scannow
Let it finish — takes 10-20 minutes. If it finds issues, it'll fix them. Then restart and try the update again.
Cause #2: Pending Updates Are Blocking the Queue
Sometimes 0x80070002 shows up because there's a half-installed update sitting in the wings. Windows gets confused when it has a pending update that never finished — usually from a previous restart that got interrupted. You'll often see this after a Windows feature update fails halfway.
The fix is to force Windows to complete or clear that pending state. First, try the Windows Update Troubleshooter — yeah, I know, it feels like a punt, but it actually does fix this specific issue sometimes. Go to Settings > Update & Security > Troubleshoot > Additional troubleshooters, run the Windows Update one. It'll reset the update components automatically.
If that doesn't cut it, you need to manually clean the pending XML files. Here's the no-nonsense way:
- Boot into Safe Mode with Networking. Hold Shift while clicking Restart, or mash F8 during boot on older systems.
- Open an admin Command Prompt and stop the update services again (same commands as above).
- Delete the pending updates folder:
del /f /q %systemroot%\winsxs\pending.xml
rmdir /s /q %systemroot%\WinSxS\InstallationPending
Wait — that second one might not exist on all systems. If you get an error, ignore it. The pending.xml deletion is the important part. Restart normally and hit Windows Update again. This clears any stuck update that was blocking the queue.
Cause #3: Disk Space or Permission Issues
Less common, but I've seen it on older laptops with small SSDs. If Windows Update doesn't have enough room to stage the update, it throws errors like this. Also, if the Windows Update service doesn't have proper permissions to the temp folders, it'll fail out.
First check disk space. Open File Explorer, right-click C:, select Properties. If you have less than 10-15 GB free, that's likely your problem. Windows 10/11 needs room to breathe. Clean up with Disk Cleanup — run cleanmgr from Run, pick System files, and select everything. That clears old update files and temporary junk.
If space isn't the issue, check the temp folder permissions. Open an admin Command Prompt and run:
icacls C:\Windows\Temp /grant *S-1-5-32-544:(OI)(CI)F
That grants the local admins group full control over the temp folder. Sometimes permissions get messed up after a security update, and this fixes it cleanly. Restart and try the update again.
One more thing — if you're on a domain-joined machine (like a small business network), group policy might be blocking updates. Check with your IT person (if that's you, check gpedit.msc under Computer Configuration > Administrative Templates > Windows Components > Windows Update). But that's a niche case. For 95% of people, the cache clear does the trick.
Quick Reference Table
| Cause | Fix | Time |
|---|---|---|
| Corrupted update cache | Stop services, rename SoftwareDistribution, restart services | 5 min |
| Pending updates stuck | Run troubleshooter, delete pending.xml in Safe Mode | 15 min |
| Low disk space or permissions | Disk Cleanup, or grant temp folder permissions | 10 min |
Start with the cache clear. It's quick, safe, and fixes most cases. If you still see the error after all three, you might be looking at a deeper system corruption — then it's time to consider a repair install with the Media Creation Tool. But that's a last resort.