You're trying to run Windows Update, maybe installing the latest monthly patch or a driver update, and halfway through it throws 0x80070020. The update bar freezes, then fails. This happened to a client of mine last week on a Dell laptop running Windows 11 22H2 – they had a third-party antivirus scanning in the background. The error means a file that Windows Update needs is locked by another process. Could be your antivirus, a backup tool, or even a stuck Windows service.
What Actually Causes This Error
The error code 0x80070020 translates to ERROR_SHARING_VIOLATION – plain English: another program has the file open and won't let go. Windows Update downloads files to C:\Windows\SoftwareDistribution\Download. If something like Windows Defender real-time scanning, a third-party antivirus, or even an old update installer is using that file, the update fails. The trigger is almost always a background service or security tool that's too aggressive.
I've seen this most often after a system wakes from sleep or hibernate. The update service starts but some other service didn't release its lock properly. Also common after installing a new antivirus – it starts scanning everything mid-update.
Step-by-Step Fix
- Boot into Safe Mode with Networking. This bypasses most third-party services. Hold Shift while clicking Restart, then Troubleshoot > Advanced Options > Startup Settings > Restart, then press 5 for Safe Mode with Networking.
- Stop the Windows Update services. Open Command Prompt as Administrator (right-click Start, choose it). Run these commands one at a time:
net stop wuauserv net stop cryptSvc net stop bits net stop msiserver - Delete the temporary update folders. These folders hold the locked files. Run:
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old ren C:\Windows\System32\catroot2 Catroot2.oldThis renames them, so Windows creates fresh ones on restart.
- Restart the services. Same Command Prompt:
net start wuauserv net start cryptSvc net start bits net start msiserver - Reboot normally and run Windows Update again.
If that doesn't fix it, the culprit is likely a third-party antivirus. Disable real-time protection temporarily. For Windows Defender, you can turn off real-time scanning in Virus & Threat Protection settings. For McAfee, Norton, or Bitdefender, open the app and pause protection for 10 minutes. Then try the update again.
Still Failing? Check These
- Corrupt system files. Run
sfc /scannowin Command Prompt as Admin. If it finds issues, runDISM /Online /Cleanup-Image /RestoreHealth. - Disk space low? Windows Update needs room to download and install. Check your free space in Settings > System > Storage. Aim for at least 10GB free.
- Check the Windows Update log. Look at
C:\Windows\WindowsUpdate.logfor exact file paths that are locked. Search for "0x80070020" in that file to see which file caused the issue.
I've seen this error resolved by simply rebooting twice – once to clear locks, once to retry. But if the steps above don't work, the problem is usually a persistent service or driver locking the file. Use Process Explorer (free from Microsoft) to search for the file name mentioned in the log, then kill that process. Had a client once where a stuck OneDrive sync process was locking the update files – killed it, update ran fine.