Windows Update error 0x80070020, explained and fixed

0x80070020 is ERROR_SHARING_VIOLATION: a file Windows Update needs is open in another process, so the update cannot get exclusive access to it. It appears at the install stage, and its most common author is real-time antivirus scanning the very files being replaced, with a second installer running at the same time a close second.

The fix, in order

  1. Restart the PC and run the update before anything else. A reboot releases every file lock. Updating immediately, before opening your usual programs, removes most sharing violations from contention.
  2. Temporarily disable third-party antivirus. Its real-time scanner holds update files open mid-install. Disable it for the attempt; Windows Security keeps the machine protected.
  3. Make sure no other installer is running. Check for setup programs, game launchers updating, or an earlier stuck install. If the Windows Installer service seems wedged with a phantom operation, a restart clears it; do not run two installs at once.
  4. Run the Windows Update troubleshooter. Settings → System → Troubleshoot → Other troubleshooters → Windows Update → Run. It catches stopped services, cache problems, and registration faults automatically.
  5. Reset the Windows Update components. In an admin Command Prompt, stop the services: net stop wuauserv, net stop cryptSvc, net stop bits, net stop msiserver. Rename C:\Windows\SoftwareDistribution to SoftwareDistribution.old and C:\Windows\System32\catroot2 to catroot2.old, then restart the four services with net start. This rebuilds the download cache and the update database from scratch.
  6. Repair the component store and system files. From an admin Command Prompt: DISM /Online /Cleanup-Image /RestoreHealth, then sfc /scannow. Restart afterwards; a repaired store often lets the same update sail through on the next attempt.

If it still happens

If the violation persists on a clean boot, use a clean-boot configuration (msconfig → Hide all Microsoft services → Disable all) to eliminate every third-party contender at once, then update. Whatever service’s return makes the error come back is the locker. Corruption beneath it all is the last possibility, addressed by the DISM step and, finally, a repair install.

Common questions

Why would antivirus block a Microsoft update? Not deliberately. The scanner opens files to inspect them at the moment the installer needs exclusive access to replace them, and the timing collision produces the violation. It is a race, which is why the same update often succeeds on a second attempt.

Is it safe to update with antivirus disabled? For the duration of one update attempt, with Windows Security (which is integrated and does not cause this clash) still running, yes. Re-enable the third-party product immediately afterwards.

Related errors

Windows Update error 0x80070005 · Windows Update error 0x80070643 · Windows Update error 0x800705b4