Use an administrator account for these steps, and keep a recent backup before making repair or security changes.
What you will achieve
Fix Windows Update error 0x80070002 (file not found) by clearing the SoftwareDistribution cache and restarting update services.
1) Run the built-in troubleshooter
- Open Settings → System → Troubleshoot → Other troubleshooters.
- Run Windows Update and apply any fixes it suggests.
- Reboot and retry Settings → Windows Update → Check for updates.
2) Stop services and rename the cache folder
Open Admin PowerShell (Win + X → Terminal (Admin)):
net stop wuauserv
net stop bits
net stop cryptsvc
Rename-Item C:\Windows\SoftwareDistribution SoftwareDistribution.old -ErrorAction SilentlyContinue
Rename-Item C:\Windows\System32\catroot2 catroot2.old -ErrorAction SilentlyContinue
net start cryptsvc
net start bits
net start wuauserv
3) Run DISM and SFC if error persists
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
- Reboot after each command completes.
- Retry Windows Update and note if the error code changes.
4) Reset Windows Update components (last resort)
- See our Reset Windows Update components guide for the full scripted reset.
- If 0x80070002 appeared after a failed feature update, consider uninstalling the problematic update from Settings → Windows Update → Update history → Uninstall updates.
5) Check CBS logs for root cause
- Open
C:\Windows\Logs\CBS\CBS.login Notepad — search for Failed near the timestamp of the error. - Common follow-on codes: missing manifest files in SoftwareDistribution\Download.
6) In-place repair upgrade (no data loss)
- Mount Windows ISO, run
setup.exefrom the source, choose upgrade — repairs system files while keeping apps and files.
7) Clear pending.xml corruption
- Stop Windows Update services, rename
C:\Windows\WinSxS\pending.xmlif present and blocking servicing. - Run DISM before SFC — order matters for component store repair.
8) Windows Update log (modern)
PowerShell: Get-WindowsUpdateLog merges ETL traces into C:\Windows\WindowsUpdate.log — search for 0x80070002 and preceding HRESULT.
- Common paired codes: 80240034 (not found) when catalog sync fails.
- Ensure system date/time correct — TLS to Windows Update fails on wildly wrong clocks.
Verification checklist
After repair, Settings → Windows Update should reach Checking without instant failure. Log timestamp and KB number if a new code appears — chain errors often reveal the underlying corrupt package.
- Reboot once after changes that affect services, drivers, or firmware.
- Confirm the original problem is resolved under normal daily use, not only immediately after the fix.
- Note date, Windows version (Settings → System → About), and what changed in your personal runbook for next time.