Here's the exact moment this mess happens: You're using Windows 10 or 11. A big update shows up – like a monthly security rollup or a feature update to version 22H2 or 23H2. You click “Download and Install.” The PC downloads it, maybe restarts once or twice. Then you see a message: “We couldn't complete the updates. Undoing changes.” The screen sits there at 20% or 30% for half an hour. Eventually you get back to your desktop. Nothing changed. The update is gone. This can loop for months if you don't fix it.
What's Going On?
The root cause is almost always a corrupted system file or a broken update cache. Here's the thing: Windows updates are not magic. They patch files that are already on your computer. If one of those files is damaged, or if the downloaded update package has a glitch, the installer can't write the new version. So it stops. Then it rolls back. The two error codes you'll see in the Windows Update history are 0x800f0988 (component store corruption) and 0x8007371b (missing or damaged update files). I've seen this happen after a failed driver install, a sudden power loss during an update, or even a disk error.
How to Fix It – Step by Step
I'm going to give you three steps in order. Do them one at a time. Test after each one. If the update works, you're done. Skip the rest.
Step 1: Run the Windows Update Troubleshooter
I know, I know – troubleshooters are hit or miss. But this one actually works for simple cache problems. It's fast. Try it first.
- Open Settings (press Windows + I).
- Click Update & Security (or Windows Update on Windows 11).
- Click Troubleshoot on the left sidebar.
- Click Additional troubleshooters.
- Find Windows Update in the list. Click it. Then click Run the troubleshooter.
- Let it run. It will try to fix common issues like stuck downloads or corrupted update cache files. When it finishes, restart your PC.
After the restart, go back to Windows Update and check for updates again. If it installs without rolling back, you're good. If not, move to step 2.
Step 2: Clean the Update Cache (SoftwareDistribution Folder)
This is where Windows stores the downloaded update files. Sometimes those files are half-baked. Deleting them forces Windows to redownload everything fresh.
- Press Windows + R to open the Run box.
- Type
services.mscand press Enter. The Services window opens. - Find these three services in the list, one at a time. Right-click each and choose Stop:
- Windows Update
- Background Intelligent Transfer Service (BITS)
- Cryptographic Services
- Open File Explorer. In the address bar, type
C:\Windows\SoftwareDistributionand press Enter. - Press Ctrl + A to select everything inside that folder. Then press the Delete key. If Windows says some files are in use, just click “Skip” – that's fine.
- Go back to the Services window. Right-click each of those three services again, one by one, and choose Start.
- Close Services. Restart your PC.
Now open Windows Update again. Click “Check for updates.” It will download a fresh copy. This often fixes the rollback problem. If it still fails, go to step 3.
Step 3: Repair System Files with DISM and SFC
This is the real fix for corruption. You'll use two command-line tools. DISM fixes the component store (the source for system file copies). SFC then replaces any bad files with good ones.
- Right-click the Start button. Choose Windows Terminal (Admin) or Command Prompt (Admin). If you get a UAC prompt, click Yes.
- First, run DISM. Type this command and press Enter:
Wait for it to finish. It might take 10 to 20 minutes. You'll see a progress bar. Don't close the window. Once it says “The operation completed successfully,” move to the next command.DISM /Online /Cleanup-Image /RestoreHealth - Now run SFC. Type this and press Enter:
This scans all protected system files and replaces corrupted ones. It can take 15 to 30 minutes. When it finishes, you'll see one of these messages:sfc /scannow- “Windows Resource Protection did not find any integrity violations.” – Great, no corruption found.
- “Windows Resource Protection found corrupt files and successfully repaired them.” – Perfect, it fixed stuff.
- “Windows Resource Protection found corrupt files but was unable to fix some of them.” – This means deeper damage. You may need to run DISM again, or consider a repair install.
- Restart your PC.
After restart, check for updates again. If it installs cleanly, you fixed it. If not, read the next section.
If It Still Fails
Sometimes the corruption is too deep for DISM and SFC. Or the update itself is broken for your specific hardware. Here's what to try:
- Manually download the update. Go to Microsoft Update Catalog. Search for the KB number from the failed update (you'll see it in Windows Update history). Download the .msu file that matches your system (x64 or arm64). Double-click it to install.
- Use the Windows 11 Installation Assistant (for feature updates). Download it from Microsoft's site. It runs a full upgrade, which replaces almost all system files. This often works when Windows Update can't.
- Check disk errors. Open an admin command prompt and run
chkdsk c: /f /r. You'll need to schedule it for the next restart. Let it run overnight. Hard drive problems can cause update failures. - If nothing works, do a repair install. Download the Windows 10 or 11 Media Creation Tool. Run it and choose “Upgrade this PC now.” Keep your files and apps. This is like reinstalling Windows without losing anything. It fixes everything.
One last thing: make sure your disk has enough free space. Updates need about 20GB free. If you're low on space, that can also trigger a rollback. Clear out old files using Disk Cleanup (search for it in the Start menu, then click “Clean up system files”).
That's the full fix. Start with step 1, work your way down. You'll get it sorted.