0x80070021_
Update Failed � Lock Violation
Seeing 0x80070021 on Windows 10/11 means the OS detected "Update Failed � Lock Violation". Before reinstalling anything, work through the steps below — the fix is often simpler than it looks.
What Actually Happened
Windows 10/11 tried to install an update and the specific system condition behind it was 'the process cannot access the file because another process has locked a portion of the file'. Clearing the update cache and retrying resolves the majority of cases.
Symptoms
A Windows Update install fails or rolls back with error 0x80070021, sometimes after a restart loop
Common Causes
- The underlying Win32 condition ERROR_LOCK_VIOLATION (the process cannot access the file because another process has locked a portion of the file) was raised while staging or applying the update
- The Windows Update cache (SoftwareDistribution) holds a stale or corrupted entry
- Insufficient free disk space to stage the update package
- A third-party antivirus or a Group Policy restriction is blocking the installer
How to Fix It
-
01
Run the built-in Windows Update Troubleshooter (Settings > System > Troubleshoot)
-
02
Stop the Windows Update service:
net stop wuauserv && net stop bits -
03
Rename the cache folder:
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old -
04
Restart services:
net start wuauserv && net start bits -
05
Run system repair:
sfc /scannow && DISM /Online /Cleanup-Image /RestoreHealth
System Administrator Emergency Kit
Stop searching for syntax under pressure. Get 100+ verified, battle-tested emergency recovery commands for Windows & Linux in one printable PDF guide.
Root Cause Breakdown
0x80070021 is the HRESULT wrapping of Win32 error 33 (ERROR_LOCK_VIOLATION): the process cannot access the file because another process has locked a portion of the file. The servicing stack (CBS) failed to complete the staging phase.
Should You Worry?
Safe to keep using your PC normally while working through the fix.
Power-User Tip
Before running DISM, renaming C:\Windows\SoftwareDistribution to SoftwareDistribution.old clears 80% of 0x80070021 failures instantly.
DIY fix: $0; Paid remote tech support if DISM repair fails: $40�$90