Fixing 'Error Code: 0x80070002' on Windows 10/11
This error means Windows Update can't find the files it needs. It's usually a corrupted update cache or a missing system file—quick to fix once you know how.
Quick answer for advanced users
Stop the Windows Update service, delete the C:\Windows\SoftwareDistribution folder, restart the service, then run sfc /scannow followed by DISM /Online /Cleanup-Image /RestoreHealth.
Why this happens
Error 0x80070002 is Windows Update's way of saying it can't find the download files it needs. I've seen this on Windows 10 version 22H2 and Windows 11 version 23H2 mostly after a failed update attempt, a sudden shutdown during an update, or when third-party antivirus (looking at you, McAfee) locks the update cache. The error itself—ERROR_FILE_NOT_FOUND—points directly to missing or corrupted files in the SoftwareDistribution folder or a system file issue. Don't waste time reinstalling Windows yet; 90% of the time these steps fix it.
Step-by-step fix
1. Run the Windows Update Troubleshooter
Yes, it's basic, but it often clears out stuck update files automatically. On Windows 10: go to Settings > Update & Security > Troubleshoot > Additional troubleshooters > Windows Update. On Windows 11: Settings > System > Troubleshoot > Other troubleshooters > Windows Update. Let it run and restart your PC. If it fails or doesn't change anything, move to step 2.
2. Stop Windows Update services and clear the cache
This is the fix that works for most people. Open Command Prompt as administrator (search for cmd, right-click, Run as administrator). Run these commands one at a time, pressing Enter after each:
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 msiserverThe ren commands rename the update cache folders—Windows will create fresh ones when you restart the services. I've done this on hundreds of machines and it clears the error about 70% of the time.
3. Run System File Checker (SFC) and DISM
If the cache reset didn't work, corrupted system files are likely the culprit. Still in Command Prompt (admin), run:
sfc /scannowThis scans all protected system files and replaces corrupted ones. Let it finish. It takes 10-20 minutes. After that, run DISM to fix the component store that SFC relies on:
DISM /Online /Cleanup-Image /RestoreHealthThis downloads fresh system files from Windows Update. If your internet is slow, this step might take a while. Once both complete, restart your PC and check for updates again.
4. Manually download and install the failed update
If you still see the 0x80070002 error, the update itself might be partially downloaded. Go to Microsoft Update Catalog, search for the KB number from your Windows Update history (e.g., KB5021234), download the correct version for your system (x64 or x86), and double-click the .msu file to install it. This bypasses the automatic update mechanism entirely.
Alternative fixes if the main steps don't work
Check disk for errors
A failing hard drive can cause missing files. Run chkdsk /f C: in Command Prompt (admin). You'll need to schedule it for next restart—type Y and reboot. Disk check can take a while on larger drives.
Disable third-party antivirus temporarily
I've seen McAfee and Norton lock the update cache. Disable real-time protection or uninstall the antivirus temporarily, then try the update again. Don't forget to re-enable it afterward.
Reset Windows Update components manually (advanced)
If none of the above works, download the Windows Update Troubleshooter from Microsoft and run it. If that still fails, you can reset the Windows Update components manually using a script from Microsoft's support site. Search for "Windows Update reset script" and run it as admin. I only recommend this as a last resort before a repair install.
Prevention tip
Set Windows Update to not restart your PC automatically during active hours. Go to Settings > Windows Update > Advanced options and adjust active hours to cover when you're using the PC. This prevents the sudden shutdowns that corrupt the update cache. Also, keep at least 10-15 GB free on your system drive—low disk space is a common trigger for this error on older machines.
Was this solution helpful?