Windows Update won't install because a file is locked. You get error 0x80070020, the update fails, and nothing you try seems to clear it. Fifteen years of remote support has taught me this error appears more often than it should, and it's almost always antivirus software or a background process holding the file hostage.
TL;DR
Error 0x80070020 means a file is locked by antivirus or another process. Disable your antivirus, run the Windows Update Troubleshooter, restart your system, and retry the update. If that fails, stop Windows Update services via Command Prompt, rename the SoftwareDistribution and Catroot2 folders, restart the services, run DISM and SFC repairs, then retry. Success rate: 70-80% on first attempt.
Key Takeaways
- Error 0x80070020 is a sharing violation: something has a file locked that Windows Update needs
- Antivirus real-time scanning is the most common culprit, followed by background applications
- The fix escalates from simple (disable antivirus, restart) to intermediate (reset update components) to advanced (clean boot, manual download)
- Prevention requires antivirus exclusions and maintaining free disk space
- Most users solve this with Solution 1 or 2; Solution 3 is for persistent cases
At a Glance
- Difficulty: Intermediate
- Time Required: 15-45 mins
- Success Rate: 70-80% of users on first two solutions
What Causes Windows Update Error 0x80070020 Files In Use Cannot Update?
The error code 0x80070020 is a Windows sharing violation. Technically, it means ERROR_SHARING_VIOLATION: the file you're trying to access is already open by another process, and Windows won't let you overwrite it. During Windows Update, this becomes catastrophic because the update process needs to replace or modify system files, and if something else has those files locked, the operation fails immediately.
The most common cause is antivirus software. Real-time protection scans every file operation in real time. When Windows Update tries to place new files in the system folders, the antivirus engine locks those files to scan them, creating a deadlock: Update wants to write, antivirus wants to read, neither backs down. This happens even with big-name security software like Windows Defender, Norton, McAfee, and Kaspersky.
The second major culprit is background processes holding open file handles. OneDrive, Dropbox, Windows Backup, BITS (Background Intelligent Transfer Service), and even legitimate system services can keep files open. When Update tries to replace them, you get the sharing violation. Sometimes it's obscure software you forgot about. Sometimes it's a system service that didn't properly release a file.
Corrupted update caches in the SoftwareDistribution and Catroot2 folders can also trigger this. If a prior update was interrupted or failed, the cache can become corrupted, causing the update service to repeatedly try and fail to access the same locked files. This typically requires a cache reset to resolve.
Windows Update Error 0x80070020 Quick Fix
Run Windows Update Troubleshooter and Disable Antivirus Easy
- Open the Windows Update Troubleshooter
Go toSettings > Update & Security > Troubleshoot > Additional troubleshooters > Windows Update. Click Run the troubleshooter. This automated tool scans for common blocking issues and attempts repairs without manual intervention. It typically takes 2-5 minutes. - Temporarily disable your antivirus
Open your antivirus programme (Windows Security, Norton, McAfee, Kaspersky, Bitdefender, etc.). Find the real-time protection or real-time scanning setting and pause it for 15-30 minutes. Do not disable the entire antivirus, just pause live scanning. This removes the file locking caused by antivirus scanning. - Perform a full restart
Close all open applications and restart your computer completely (not sleep, not hibernate). A full restart clears temporary file locks and allows background processes to properly release file handles. Expect 2-3 minutes for the restart. - Retry Windows Update
Go toSettings > Update & Security > Windows Updateand click Check for updates. The update should now install without the 0x80070020 error. If it begins downloading, let it complete without interruption. - Re-enable antivirus protection
Once the update completes successfully, return to your antivirus software and turn real-time protection back on immediately. Do not leave antivirus disabled.
More Windows Update Error 0x80070020 Solutions
Reset Windows Update Components and Run System Repairs Intermediate
If Solution 1 didn't work, the update cache itself is likely corrupted. This solution rebuilds it from scratch.
- Open Command Prompt as Administrator
Right-click the Start button and select Command Prompt (Admin) or Windows PowerShell (Admin). If prompted by User Account Control, click Yes. You need full administrative privileges for these commands. - Stop Windows Update services
Type each command below and press Enter after each one. Wait for the command to complete (usually 1-2 seconds) before entering the next:net stop wuauservnet stop cryptSvcnet stop bitsnet stop msiserver
These commands stop the Windows Update service, Cryptographic service, Background Intelligent Transfer Service, and Windows Installer, all of which might be locking files. - Rename the corrupted cache folders
Type these two commands:ren C:\Windows\SoftwareDistribution SoftwareDistribution.oldren C:\Windows\System32\catroot2 catroot2.old
If you see an error saying the folder is in use, skip ahead to the next step and try again after restarting the services. The rename operation creates a backup and forces Windows to rebuild fresh caches on restart. - Restart the stopped services
Type each command and press Enter:net start wuauservnet start cryptSvcnet start bitsnet start msiserver
The services restart with the new, empty cache folders. - Run DISM repair
Type this command:DISM /Online /Cleanup-Image /RestoreHealth
Press Enter. This command scans and repairs the Windows system image using Microsoft's online component store. It typically takes 15-20 minutes. Do not interrupt it. You'll see a progress percentage; when it reaches 100%, the command completes. - Run System File Checker
Type this command:sfc /scannow
Press Enter. This scans all protected system files and repairs any corrupted ones. It typically takes 10-15 minutes. Again, do not interrupt. If it finds issues, it automatically repairs them. - Restart and retry
Close Command Prompt and restart your computer. Once booted, go toSettings > Update & Security > Windows Updateand click Check for updates.
Advanced Windows Update Error 0x80070020 Fixes
Perform Clean Boot and Manual Update Installation Advanced
If Solutions 1 and 2 failed, a third-party application is aggressively blocking the update, or the Windows installation itself is unstable. Clean Boot isolates the culprit; manual installation bypasses Windows Update altogether.
- Configure Clean Boot
PressWin+R, typemsconfig, and press Enter. Click the Services tab. Tick the checkbox 'Hide all Microsoft services' at the bottom left. Now click Disable All. This disables all third-party services. Next, click the Startup tab, then click Open Task Manager. In Task Manager, you'll see a Startup tab. Right-click each startup item and select Disable for every entry. Close Task Manager and msconfig. This configuration boots your system with minimal third-party interference. - Restart in Clean Boot mode
Close all windows and restart your computer. It will boot with only essential Microsoft services running. This typically takes slightly longer than normal boot. - Attempt the update in Clean Boot
Once booted, go toSettings > Update & Security > Windows Updateand click Check for updates. Try to download and install the update. If it succeeds here, you know a third-party application was the blocker. If it still fails, the problem is deeper (corrupted Windows or driver issue). - Identify the problematic software (if update succeeded)
Restart your computer normally to exit Clean Boot. Go back to msconfig and re-enable services and startup items in small groups (5 at a time), restart after each group, and retry the update. When the error returns, you've identified the culprit. Uninstall or update that software, then retry the update. - Download and install the update manually (if update still fails in Clean Boot)
Visit catalog.update.microsoft.com. Search for the specific KB number of the update that's failing. You can find this inSettings > Update & Security > Windows Update > View update history. Download the .msu file for your system architecture (x64 for 64-bit, x86 for 32-bit). Save it to your Desktop. Once downloaded, right-click the .msu file and select Install. This bypasses Windows Update entirely and applies the patch directly. This often works when Windows Update itself is broken. - Last resort: In-Place Upgrade repair
If the manual .msu installation fails, your Windows installation may be severely corrupted. An In-Place Upgrade rebuilds Windows while preserving your files and applications. Download the Windows 10 or Windows 11 ISO from microsoft.com/en-gb/software-download (use the UK English version). Mount the ISO file (right-click > Mount on Windows 10/11), open the mounted drive, and runsetup.exe. Choose 'Keep personal files and apps'. The process takes 1-2 hours. This is the nuclear option but often resolves persistent update issues. Back up critical data to OneDrive or an external drive before starting. - Restore normal boot configuration
After the update succeeds, return to msconfig, click the Services tab, uncheck 'Hide all Microsoft services', and click Enable All. Go to the Startup tab, open Task Manager, and re-enable startup items you need. Restart normally. Your system returns to full operation.
Why Error 0x80070020 Keeps Recurring (And How to Stop It)
Even after you fix the immediate error, the same issue can return if you don't address the root cause. If antivirus was the culprit, it will lock files again on the next major update. If a third-party application was blocking, it will do so again unless you uninstall it or add its folders to your antivirus exclusion list.
The key is recognizing that system files and update caches need protection from constant scanning. Most antivirus programmes allow you to whitelist specific folders. Add C:\Windows\SoftwareDistribution and C:\Windows\System32\catroot2 to your antivirus exclusion list. This tells your antivirus: "Don't scan these folders in real time." You're not disabling antivirus; you're just preventing it from scanning folders that should be left alone during updates.
Similarly, if you found a problematic third-party application (like a file sync tool, system optimiser, or backup software), either update it to the latest version or uninstall it. Outdated applications often have compatibility issues with newer Windows versions and can trigger file locking unexpectedly. If you really need the software, contact the vendor for a compatible version.
Error 0x80070020 typically resolves with one of the first two solutions, but if you've hit Solution 3 and need professional guidance through the manual update or In-Place Upgrade process, our remote support team can manage the entire operation while you watch, ensuring your data stays safe and the update completes correctly.
Get remote helpPreventing Windows Update Error 0x80070020 Files In Use Cannot Update
Free up disk space first. Windows Update needs at least 15-20 GB of free space on your system drive (C:\) to download, extract, and install updates. If you're running below 10 GB, clear temporary files, uninstall unused applications, and move large files to external storage. Use Disk Cleanup: press Win+R, type cleanmgr, and press Enter. Select your system drive and let it clean temporary files. This often frees 2-5 GB.
Exclude update folders from antivirus scanning. Open your antivirus software and find the exclusion list or whitelist settings. Add these two paths:
C:\Windows\SoftwareDistributionC:\Windows\System32\catroot2
This prevents real-time scanning from locking files in these critical folders during updates. Most antivirus programmes have this setting under Settings > Exclusions, Whitelist, or Virus & threat protection. If you're unsure, check your antivirus vendor's support documentation.
Close background applications before major updates. Before installing Windows feature updates (not just security patches), close unnecessary applications: OneDrive, Dropbox, email clients, browser, file explorers beyond what you need. These applications hold file handles on system drives. A cleaner system means fewer file locking conflicts.
Run monthly preventive scans. Once monthly, open Command Prompt as Administrator and run these two commands to catch and repair corrupted files before they cause update failures:
DISM /Online /Cleanup-Image /RestoreHealthsfc /scannow
This takes 25-30 minutes but catches issues early.
Schedule updates during idle times. Go to Settings > Update & Security > Windows Update > Change active hours. Set active hours to when you typically use your computer (e.g., 8 AM to 10 PM). Windows will automatically install updates outside these hours, usually late evening or early morning, when background processes are fewer and file locking is less likely.
Keep antivirus updated. Outdated antivirus definitions sometimes over-aggressively block legitimate system operations. Update your antivirus software frequently (most modern antivirus updates automatically). Consider using Windows Defender, which is built into Windows and is specifically tested for Windows Update compatibility.
Windows Update Error 0x80070020 Summary
Error 0x80070020 is a sharing violation: Windows Update cannot access or replace a file because another process has it locked. Antivirus real-time scanning is the culprit in most cases, followed by background applications and corrupted update caches. The fix escalates logically: disable antivirus and restart (70-80% success), then reset Windows Update components (60-70% success), then perform clean boot and manual installation (50-60% success). Prevention requires antivirus exclusions, adequate disk space, and monthly preventive scans. If you've exhausted the three solutions here and the error persists, the Windows installation itself may be corrupted, and an In-Place Upgrade or professional support may be necessary. Most users resolve this on the first or second attempt.


