Fixes / Windows · Checked

Windows Update error 0x80070002: what it means and how to fix it

Short answer

Error 0x80070002 means ERROR_FILE_NOT_FOUND: Windows Update looked for a file it needed and it was missing or damaged, usually because an earlier update was left half finished. The most reliable fix is to stop the update services, rename the C:\Windows\SoftwareDistribution and catroot2 folders so Windows downloads fresh copies, restart the PC and run Windows Update again.

What this message means

The code breaks down into two parts. 0x8007 means the error came from a standard Windows (Win32) function, and 0002 is Win32 error 2, ERROR_FILE_NOT_FOUND. Windows Update or the servicing stack (the component that installs updates) tried to open a file, folder or registry entry and it was not there. Microsoft lists the usual reasons as an earlier update that stopped partway, missing or corrupt system files, and registry entries that point to files or services that no longer exist. Your personal files are not affected. The update simply cannot finish until the missing piece is replaced or downloaded again.

Common causes

CauseHow to tell
Corrupt or incomplete files in the Windows Update download cache (SoftwareDistribution folder)The update downloads, then fails at install with 0x80070002. The same KB keeps failing after you click Retry, and often another update also shows as failed or stuck at 0% or 100% downloading.
An earlier update was interrupted and left Windows in an inconsistent stateThe error began after a restart during updating, a power cut, or a forced shutdown. Settings > Windows Update > Update history shows a failed or rolled-back update near the date the problem started.
Damaged Windows system files or component store (WinSxS)Running sfc /scannow reports that it found corrupt files, or DISM /RestoreHealth finds problems. C:\Windows\Logs\CBS\CBS.log contains lines with ERROR_FILE_NOT_FOUND or "Failed to find file".
Wrong system date, time or time zoneThe clock in the taskbar is wrong, or "Set time automatically" is turned off. Websites may also show certificate warnings.
Third-party antivirus, cleanup tools or a missing folder or registry key that the update expectsThe update installs fine in a clean boot or after uninstalling the antivirus. A registry or "PC cleaner" tool was run recently, or CBS.log names a specific missing folder, driver or service.

How to fix it

1. Check the date and time, then restart and retry

  1. Windows 11: open Start > Settings > Time & language > Date & time. Windows 10: Start > Settings > Time & Language > Date & time.
  2. Turn on "Set time automatically" and "Set time zone automatically" (if available), then click "Sync now".
  3. Make sure the PC has at least 20 GB of free space on drive C: for a feature update.
  4. Restart the PC (use Restart, not Shut down).
  5. Go back to Windows Update and select "Check for updates" or "Retry".

2. Run the Windows Update troubleshooter

Windows 11 and Windows 10 (paths differ)

  1. Windows 11: Start > Settings > System > Troubleshoot > Other troubleshooters, then select Run next to Windows Update.
  2. Windows 10: Start > Settings > Update & Security > Troubleshoot > Additional troubleshooters > Windows Update > Run the troubleshooter.
  3. On newer Windows 11 builds this opens the Get Help app. Follow its prompts and accept any fixes it offers.
  4. Restart the PC and run Windows Update again.

3. Reset the Windows Update cache (SoftwareDistribution and catroot2)

  1. Search Start for cmd, right-click Command Prompt and choose "Run as administrator".
  2. Stop the update services by running these one at a time: net stop wuauserv, then net stop bits, then net stop cryptsvc.
  3. Rename the cache folders: ren C:\Windows\SoftwareDistribution SoftwareDistribution.old and ren C:\Windows\System32\catroot2 catroot2.old
  4. Start the services again: net start wuauserv, net start bits, net start cryptsvc.
  5. Restart the PC, open Windows Update and check for updates. Windows rebuilds both folders and downloads the update again. Your update history list may look empty, which is normal.

4. Repair system files with DISM and SFC

  1. Open Command Prompt as administrator.
  2. Run: DISM.exe /Online /Cleanup-image /Restorehealth and wait for it to reach 100% (it can sit at 20% or 62% for several minutes).
  3. Run: sfc /scannow and wait for the verification to finish.
  4. If SFC says it repaired files, restart the PC.
  5. Run Windows Update again.

5. Install the failed update manually from the Microsoft Update Catalog

  1. Open Settings > Windows Update > Update history and note the KB number of the failed update (for example KB5065789).
  2. Go to catalog.update.microsoft.com and search for that KB number.
  3. Download the package that matches your Windows version and system type (x64 or ARM64, shown in Settings > System > About).
  4. Double-click the downloaded .msu file and follow the prompts, then restart.
  5. If it still fails, temporarily uninstall third-party antivirus or do a clean boot (msconfig > Services > Hide all Microsoft services > Disable all) and try again.

6. Reinstall the current version of Windows without losing files

Settings option is Windows 11 only (build 22621 or later with the February 2024 update or newer). On Windows 10, use the in-place upgrade from the Media Creation Tool.

  1. Back up important files first.
  2. Windows 11: Start > Settings > System > Recovery. Under "Fix problems using Windows Update", select "Reinstall now".
  3. Keep the PC plugged in and connected to the internet until it finishes. Apps, files and settings are kept.
  4. Windows 10 (or if the option is missing): download the Media Creation Tool or ISO from microsoft.com/software-download, run setup.exe from inside Windows and choose "Keep personal files and apps".
  5. After the reinstall, run Windows Update again.

Next time, skip the search

Crade is an AI assistant for Mac and Windows that sees your screen. When a message like this pops up, ask “what does this mean?” and it explains the exact error in front of you, step by step.

Download Crade

Still not fixed?

Open C:\Windows\Logs\CBS\CBS.log (or run Get-WindowsUpdateLog in PowerShell for WindowsUpdate.log) and search for 80070002 or ERROR_FILE_NOT_FOUND. The line usually names the exact missing file, folder or service. Microsoft's Learn article on this error explains specific fixes for missing .NET clr_optimization registry keys, a missing Start Menu "System Tools" folder, and missing WinSxS files. If the PC is managed by work or school, contact IT because WSUS or Intune policies can block updates. Otherwise, post the log lines on Microsoft Q&A or contact Microsoft Support through the Get Help app.

Questions people ask

What does error code 0x80070002 mean?

It is Win32 error 2, ERROR_FILE_NOT_FOUND. Windows Update needed a file or folder that was missing or corrupt, usually after an earlier update was interrupted.

Is it safe to delete or rename the SoftwareDistribution folder?

Yes, as long as you stop the wuauserv and bits services first. It only holds temporary update downloads, and Windows rebuilds it automatically. You only lose the displayed update history list, not installed updates.

Will fixing 0x80070002 delete my files?

None of the fixes above delete personal files, including "Reinstall now" and an in-place upgrade with "Keep personal files and apps". Back up anyway before a reinstall.

Can I just ignore error 0x80070002?

Not for long. Failed cumulative updates mean missing security patches, and later updates often fail the same way until the underlying problem is fixed.

Why do I get 0x80070002 in other places, like the Microsoft Store or backup?

The code means "file not found" everywhere in Windows, so it appears in the Store, Xbox app, backup and Outlook too. The cause is a different missing file in each case, so the Windows Update fixes on this page will not necessarily help there.

Sources