Note the KB number of the failing update in Settings > Windows Update > Update history. If Windows cannot start, see the startup guide.
Work through these checks
0 of 7 complete01Restart and try again
A file locked by a running program or a pending restart is released by a restart.
- Restart the PC with Restart (not Shut down).
- Before checking for updates, close other programs.
The update installs.
If it does not helpIf it fails again with 0x80070020, continue with step 2.
02Pause or remove third-party security software
Microsoft says this error is caused by non-Microsoft filter drivers, such as antivirus.
- Temporarily turn off real-time protection in your third-party antivirus, or uninstall it in Settings > Apps > Installed apps.
- Also pause backup, cloud sync and disk encryption tools.
- Try the update again, then turn protection back on.
Microsoft Defender turns on automatically when another antivirus is removed; keep it on.
The update installs while the program is paused or removed.
If it does not helpIf uninstalling helped, install the latest version of the program afterwards.
03Update with a clean boot
Microsoft's mitigation starts with a clean restart, which starts Windows without non-Microsoft services and startup programs.
- Press Win + R, type msconfig, open the Services tab, tick Hide all Microsoft services and click Disable all.
- Open Task Manager > Startup apps and disable each startup item.
- Restart, install the update, then undo both changes (Enable all in msconfig, re-enable startup apps) and restart again.
Remember to undo the clean boot settings, or some programs will not start.
The update installs in the clean boot state.
If it does not helpTo find the exact program, re-enable services in halves and test again.
04Run the Windows Update troubleshooter
The troubleshooter resets update components that may be stuck.
- On Windows 11, open Settings > System > Troubleshoot > Other troubleshooters and select Run next to Windows Update.
- On Windows 10, use Settings > Update & Security > Troubleshoot > Additional troubleshooters.
The troubleshooter fixes the problem it finds.
If it does not helpRestart and try the update again.
05Clear the Windows Update cache
A partly downloaded update can keep failing on the same locked file.
- Open Command Prompt as administrator and run net stop wuauserv and net stop bits.
- Run ren %systemroot%\SoftwareDistribution\Download Download.bak.
- Run net start bits and net start wuauserv, then check for updates.
Use Command Prompt, not PowerShell, for the ren command with %systemroot%.
The update downloads again and installs.
If it does not helpIf it still fails, find the locking program in step 6.
06Find the locking program with Process Monitor
Microsoft's advanced mitigation is to find the file named in the CBS log and see which process blocks it.
- Open C:\Windows\Logs\CBS\CBS.log in Notepad and search for 0x80070020 to find the file name involved.
- Download Process Monitor from Microsoft Sysinternals, start it, and retry the update.
- Filter Process Monitor by that file path and look for the non-Microsoft process accessing it; stop or uninstall that program.
This step is for advanced users; Process Monitor collects a lot of data quickly.
You find the program that locks the file.
If it does not helpContact the program's maker for an update that does not block Windows updates.
07Install the update manually
A manual installation can succeed when the automatic one is interrupted.
- Download the update by its KB number from the Microsoft Update Catalog (catalog.update.microsoft.com).
- Run the .msu file in a clean boot state (step 3).
Download updates only from Microsoft.
The update installs.
If it does not helpIf even this fails, see the Windows Update errors overview on this site for repair options.
Possible causes
- Third-party antivirus or security software scanning or locking update files
- Backup, encryption, sync or disk tools with filter drivers
- Other programs running during the update
- A pending restart from an earlier update
Was this helpful?
Your progress is saved on this device.