Windows Update fails for a handful of common reasons: damaged system files, a corrupted download cache or too little disk space. This guide goes from the quickest fix to the full reset, so you can stop as soon as the problem is solved. It works on Windows 10 and Windows 11.
Step 0: The quick checks
- Make sure you have at least 10 GB of free space on the system drive.
- Restart the PC. A pending restart blocks new updates more often than you would think.
- Disconnect from a VPN and try again.
Step 1: Run the built-in troubleshooter
Open Settings > System > Troubleshoot > Other troubleshooters (Windows 11) or Settings > Update & Security > Troubleshoot > Additional troubleshooters (Windows 10), then run Windows Update. It fixes simple cases automatically.
Step 2: Repair system files with DISM and SFC
Open Command Prompt as Administrator and run these two commands in this order. Each can take several minutes:
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
DISM repairs the component store that updates are built from, then sfc repairs protected system files from it. Restart afterwards and check for updates again.
Step 3: Reset the Windows Update components
If updates still fail, clear the update cache. In the same administrator Command Prompt:
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
What this does: it stops the update services, renames the folder where downloads are cached (SoftwareDistribution) and the cryptographic cache (catroot2) so Windows rebuilds them fresh, then starts the services again. Nothing of yours is touched, and the old folders stay on disk in case you need to look back.
Restart the PC, open Settings > Windows Update and click Check for updates. The first check takes longer than usual because the cache is empty.
Step 4: Read the error code
| Code | Usually means | Try |
|---|---|---|
0x80070002 |
A needed file is missing | Step 3, reset components |
0x80073712 |
The component store is damaged | Step 2, DISM then SFC |
0x800f081f |
DISM could not find repair files | Run DISM with a Windows ISO as source (below) |
0x80070005 |
Access denied | Run the commands as Administrator; check security software |
To see what really happened, generate a readable log in PowerShell. A file named WindowsUpdate.log appears on your desktop:
Get-WindowsUpdateLog
When DISM cannot find the source files
Mount a Windows ISO of the same version (double-click it so it gets a drive letter, for example E:) and point DISM at it:
DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:E:\sources\install.wim:1 /LimitAccess
The :1 is the index of the edition inside the image. List the editions with DISM /Get-WimInfo /WimFile:E:\sources\install.wim and choose the one that matches yours. Some ISOs contain install.esd instead of install.wim; use ESD: in place of WIM: then.
Last resorts
- Install the failing update manually from the Microsoft Update Catalog.
- Use Settings > System > Recovery to Reset this PC and keep your files. Back up first.
When everything is working again, you can delete the SoftwareDistribution.old and catroot2.old folders to free some space.
More tutorials like this
Why Is My Website Slow? Measure DNS, TLS and Server Time with curl
Use curl to split a web request into DNS, connection, TLS, server and download time, read the numbers correctly and fix the slow part.
Why Did My Windows PC Restart or Crash? Find the Answer in Event Viewer and PowerShell
Find out why Windows restarted: the key event IDs (41, 6008, 1074, 1001), PowerShell commands to read them, and what to fix for each…
tcpdump Tutorial: Capture and Read Network Traffic on Linux
Capture and read network traffic with tcpdump: key options, filters, a real TCP handshake explained line by line, and pcap files for Wireshark.



