When an update fails, Settings › Windows Update › Update history shows a code such as 0x80070002. The code points to the cause, so the right fix is faster than trying everything. For general steps, start with Windows 11 update failed.

Find the error code
Open Settings › Windows Update › Update history and look for Failed to install next to the update. The code is shown under it. Note the KB number too.

Common codes and fixes
| Error code | Meaning | Fix |
|---|---|---|
| 0x80070002 / 0x80070003 | Files missing from the download | Reset the update cache (SoftwareDistribution) |
| 0x800f0922 | System Reserved partition full or no VPN/connection to update servers | Disconnect VPN; free space on the EFI/recovery partition |
| 0x80073712 | Component store corrupt | Run DISM /RestoreHealth |
| 0x800f081f | Source files for a feature not found | Run DISM, then install .NET or the feature again |
| 0x80070070 | Not enough disk space | Free at least 20 GB on C: |
| 0x8024a105 / 0x80240034 | Download stuck or interrupted | Restart, then reset the update cache |
| 0x80070643 | Installer failure, often Defender or recovery partition (WinRE) updates | Install manually; check the WinRE partition size |
| 0xC1900101 | Driver problem during a feature update | Update drivers, unplug USB devices, uninstall antivirus |
Fix 1: Reset the update cache
net stop wuauserv
net stop bits
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
net start wuauserv
net start bits

Run these in Terminal (Admin), then check for updates again. This solves most 0x80070002 and download errors.
Fix 2: Repair the component store
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
Needed for 0x80073712 and 0x800f081f. See SFC vs DISM explained.
Fix 3: Free up space
Feature updates need 20 GB or more free. Follow free up disk space for 0x80070070.
Fix 4: Install the update manually
Search for the KB number in the Microsoft Update Catalog, download the .msu file that matches your version and system type, and run it. Check your version in how to check your Windows build.
Fix 5: Repair Windows with Windows Update
In Settings › System › Recovery, select Reinstall now next to Fix problems using Windows Update. It reinstalls Windows, keeping your apps and files, and usually clears stubborn update errors.