Quick Answer for Advanced Users
Stop the Windows Update service, rename C:\Windows\SoftwareDistribution to SoftwareDistribution.old, restart the service, then run Windows Update again.
Context & Why This Happens
Error 0x80070002 is Windows Update's way of saying “I can't find the file I need.” The culprit here is almost always a corrupt or incomplete download in the SoftwareDistribution folder. I've seen it happen after a failed update attempt, a system crash during an update, or even just a bad internet connection that left half-downloaded files lying around. Another common trigger: your system time is wrong. If the date or time on your PC is off by more than a few minutes, Windows Update freaks out and throws this error. Don't bother messing with registry edits or reinstalling Windows – that's overkill.
Fix Steps – Main Fix (Works 90% of the Time)
- Open Command Prompt as Admin. Hit Windows Key + X, select “Command Prompt (Admin)” or “Terminal (Admin)” on Windows 11.
- Stop the Windows Update service. Run:
This kills the update service. If it's already stopped, you'll get a message – that's fine.net stop wuauserv - Rename the cache folder. Run:
This won't delete anything, just renames the folder so Windows builds a fresh one.ren C:\Windows\SoftwareDistribution SoftwareDistribution.old - Start the service again. Run:
net start wuauserv - Run Windows Update. Go to Settings > Update & Security > Windows Update and click “Check for updates.” It should work now. If not, reboot and try again.
If That Fails – Check System Time & Run DISM/SFC
Sometimes the rename trick doesn't cut it. Here's what to try next.
Fix the System Clock
Right-click the clock in the taskbar, select “Adjust date/time.” Turn off “Set time automatically,” then turn it back on. Or manually set the correct time zone and sync. I've seen servers with hardware clock drift cause this error for days. Fix the time, and the error vanishes.
Run DISM and SFC
These tools fix corrupted system files that might be blocking the update. Open Command Prompt as Admin again and run these in order:
DISM /Online /Cleanup-Image /RestoreHealthWait for that to finish (takes 5-10 minutes), then run:
sfc /scannowIf SFC finds issues, it'll repair them automatically. Reboot after this, then try Windows Update again.
Alternative Fixes – When the Above Doesn't Work
I've only had to go this deep a handful of times in 14 years. Try these if you're still stuck.
- Reset Windows Update components manually. Create a batch file with these commands (I'll save you the typing – just copy this):
net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
ren C:\Windows\System32\catroot2 Catroot2.old
net start wuauserv
net start cryptSvc
net start bits
net start msiserver
exit - Run the Windows Update Troubleshooter. Yes, it's basic, but I've seen it fix this exact error on Windows 10 version 22H2. Go to Settings > Update & Security > Troubleshoot > Additional troubleshooters > Windows Update. It'll clear the cache and re-register stuff.
- Manually download the update. If it's a specific update failing (like KB5034441), go to the Microsoft Update Catalog, search the KB number, download the right version for your system (x64 vs x86), and install it manually. You'll need to know your OS build – run
winverto check.
Prevention Tip – Keep This From Happening Again
Two things: keep your system clock synced (set it to automatically sync with time.windows.com) and don't hard-reboot during updates. If an update seems stuck for over an hour, wait – don't hit the power button. That corrupts the download cache every time. Also, run sfc /scannow once a month. I do it on all my workstations and servers after Patch Tuesday, and I haven't seen this error in years.