Fix #1: Run DISM Component Cleanup
Run a component cleanup to remove old update files and clean up the component store. This can resolve corruption issues and make restorehealth work better before attempting deeper repairs.
Steps:
- 1. Right-click the Start button and select "Terminal (Admin)" or "Command Prompt (Admin)"
- 2. Type the following command and press Enter:
dism /online /cleanup-image /startcomponentcleanup- 3. Wait for the process to complete (this can take 10-20 minutes)
- 4. When finished, restart your computer
- 5. Try running Windows Update again to see if the error is resolved
Why This Works:
The component store can become cluttered with superseded update files that cause conflicts. Cleaning up these old files removes potential corruption sources and frees up disk space. This makes subsequent repair commands more effective because they're working with a cleaner system state.
Fix #2: Run DISM RestoreHealth
Use DISM to repair the Windows image if cleanup didn't fix the issue. This scans for corruption and downloads replacement files from Windows Update servers.
Steps:
- 1. Open an elevated Command Prompt or Terminal (Admin)
- 2. Type the following command and press Enter:
dism /online /cleanup-image /restorehealth- 3. Wait for the scan and repair to complete (this can take 20-45 minutes)
- 4. You'll see progress percentages. Don't close the window even if it seems stuck
- 5. When it says "The operation completed successfully," run this command:
sfc /scannow- 6. Wait for sfc to finish (another 15-30 minutes)
- 7. Restart your computer
- 8. Try Windows Update again
Why This Works:
DISM RestoreHealth compares your system files against a known-good reference from Microsoft's servers and replaces any corrupted files it finds. Running sfc /scannow afterward fixes any remaining file corruption that DISM couldn't detect. Together, these commands repair the Windows image so updates can install properly.
Fix #3: Use Windows Update Troubleshooter
Run the built-in Windows Update troubleshooter to automatically detect and fix common update problems. Try this before moving to more invasive repairs.
Steps:
- 1. Press Windows key + I to open Settings
- 2. Go to System > Troubleshoot > Other troubleshooters
- 3. Find "Windows Update" and click "Run"
- 4. Follow the prompts and let the troubleshooter detect issues
- 5. Apply any fixes it recommends
- 6. Restart your computer
- 7. Try Windows Update again
Why This Works:
The Windows Update troubleshooter can reset update components, clear temporary files, and restart services that might be stuck. While it won't fix deep corruption like DISM does, it can resolve permission issues, service problems, and configuration errors that prevent updates from working.
Fix #4: Perform an In-Place Repair Upgrade
Perform an in-place upgrade if DISM and sfc can't fix the corruption. This reinstalls Windows while keeping all your files, programs, and settings intact.
What You'll Need:
- Windows Media Creation Tool from Microsoft's website
- At least 8GB of free disk space
- 1-2 hours of uninterrupted time
Steps:
- 1. Download the Windows Media Creation Tool from Microsoft's website
- 2. Run the tool and accept the license terms
- 3. Select "Upgrade this PC now"
- 4. Let the tool download the latest Windows version
- 5. When asked what to keep, select "Keep personal files and apps"
- 6. Click "Install" to begin the upgrade
- 7. Your computer will restart several times during the process
- 8. After the upgrade completes, Windows Update should work normally
Important:
An in-place upgrade replaces all Windows system files while preserving your data. This fixes corruption that DISM can't repair. The process takes 1-2 hours, so plug in your laptop if you're using one. Some programs may need to be reinstalled afterward, but most will work fine.
Common Mistakes to Avoid
- ✗Don't interrupt DISM while it's running: Even if it seems stuck at a percentage for a long time, let it finish. Interrupting can make corruption worse.
- ✗Don't skip component cleanup: Running cleanup first can prevent you from needing more invasive repairs later.
- ✗Don't forget to run sfc after DISM: DISM and sfc work together. Always run sfc after a successful DISM repair.
- ✗Don't choose a clean install: During an in-place upgrade, always choose to keep your files and apps. A clean install erases everything.
How to Prevent This Problem
- ✓Let updates finish completely: Never force-restart during Windows updates. Always wait for them to complete.
- ✓Keep disk space available: Windows needs free space to download and install updates. Keep at least 20GB free on your C: drive.
- ✓Run component cleanup monthly: Running DISM cleanup once a month keeps the component store healthy.
- ✓Use a UPS if possible: Power loss during updates can cause severe corruption. A UPS prevents this.