On this page
The Problem
Windows Update keeps failing and rolling back with a code such as 0x80070643, 0x800f0922, 0x80073712, 0x80070002, or 0x8024a105. The cause is usually corrupt update files, too little free space, or a stuck component—rarely anything that needs a reinstall.
Update never finishes or freezes at a percentage? See Windows Update stuck. A patch installed and broke something? See fix Windows 11 after a bad update.
Start With the Code
| Code | What it usually means | Go to |
|---|---|---|
| 0x80070643 | WinRE partition too small (harmless) | Step 5 |
| 0x800f0922 | Component store damage, or a small EFI/system partition | Steps 3, 4 |
| 0x80073712 | Corrupt or missing update files | Steps 3, 4 |
| 0x80070002 / 0x80070003 | Missing files in the update cache | Step 3 |
| 0x8024a105 | Download or connection failure | Steps 2, 3 |
| 0x80240034 | Download blocked, often by security software | Step 6 |
| 0x800f0831 | A prerequisite update is missing | Step 7 |
Step 1: Free Up Space and Check the Basics
- Feature updates need roughly 20 GB free on C:. Quality updates need several. See free up disk space.
- Confirm the date and time are correct—Settings → Time & language → Set time automatically. A wrong clock breaks certificate validation and produces confusing generic errors.
- Plug a laptop into AC power.
- Disconnect any VPN.
Step 2: Run the Troubleshooter
Settings → System → Troubleshoot → Other troubleshooters → Windows Update → Run. Restart and retry.
Step 3: Reset the Update Components
This clears the corrupt cache behind most of these codes. In Terminal (Admin):
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
Restart and check for updates again. Once updates work, delete the two .old folders to reclaim the space.
Step 4: Repair the Component Store
0x800f0922 and 0x80073712 are component-store damage almost by definition.
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
Run DISM first—SFC repairs from the store that DISM repairs. Restart between the repair and the update retry.
If DISM itself fails with 0x800f081f, it cannot reach replacement files and needs a source: fix DISM error 0x800f081f.
Step 5: The 0x80070643 WinRE Case
This one has caused a great deal of unnecessary alarm. The recent 0x80070643 security-update failure is normally the Recovery Environment partition being too small to accept the update—not a fault in Windows itself.
- Retry after Steps 3 and 4; Microsoft has resolved many cases automatically.
- If it persists, it does not affect ordinary Windows updates and is safe to leave. A later cumulative update usually clears it.
- Resizing the recovery partition by hand is possible but involves
reagentcanddiskparton live partitions. Do not attempt it casually, and take a full backup first if you do.
Step 6: Remove the Blockers
- Pause third-party antivirus. Security suites with kernel filter drivers are a leading cause of failed updates. Uninstall rather than disable if pausing does not help.
- Disconnect external drives and docks.
- Turn off metered connection: Settings → Network & internet → your network → Metered connection off.
- Check that Windows Update is not paused or deferred by a policy you set earlier: stop Windows 11 automatic updates.
Step 7: Install the Update Manually
This bypasses the entire Windows Update pipeline and often succeeds outright.
- Find the failing KB number in Settings → Windows Update → Update history.
- Search that KB at the Microsoft Update Catalog (
catalog.update.microsoft.com). - Download the x64 package matching your Windows build.
- Run the
.msufile and restart.
For 0x800f0831, install the missing prerequisite listed in the update's support article first, then retry.
Step 8: In-Place Repair Install
For persistent corruption, reinstalling Windows over itself replaces every system file while keeping your applications and data.
- Download the Windows 11 ISO from Microsoft.
- Mount it and run
setup.exefrom inside Windows. - Choose Keep personal files and apps.
Full method: reinstall Windows without losing data.
Guides for Specific Codes
- 0x80070005 (access denied) — permissions on update folders, or a security suite blocking writes.
- 0x800f081f (source files not found) — supply DISM a source from an ISO.
- 0x80004005 (unspecified error) — generic; the real cause depends on where it appeared.
- 0x80070570 (file or directory is corrupted) — usually failing storage or a damaged download.
- Stuck on "Undoing changes made to your computer": fix the Undoing Changes loop.
If It Still Fails
Run chkdsk C: /scan and check drive health—a failing disk causes update failures that look like software corruption: check SSD or hard drive health.
Related guides
How to Fix DISM Error 0x800f081f in Windows 11
0x800f081f means DISM could not find the replacement files it needs. Point it at a Windows 11 ISO with the /Source switch and the repair completes.
How to Fix Error 0x80070005 (Access Denied) in Windows 11
Error 0x80070005 blocks Windows Update, Store downloads, and activation with an access denied message. Here is how to restore the permissions it needs.
Fix .NET Framework 3.5 Install Error in Windows 11
.NET Framework 3.5 failing with 0x800F0950 or 0x800F081F on Windows 11? Install it from the ISO, fix the Group Policy block, and repair Windows Update.
How to Fix the "Undoing Changes" Loop in Windows 11
Stuck on "We couldn't complete the updates, undoing changes"? Break the loop and install the update properly with these step-by-step fixes.
How to Fix a Missing Dual-Boot Menu in Windows 11
PC boots straight into Windows with no choice of operating system? Restore the boot menu with firmware settings, bcdedit, and a GRUB repair if needed.