0x80070091
Easy Fix
Microsoft · Windows
The directory is not empty. Windows Update cannot remove or replace a directory because it still contains files, often from a failed previous update operation.
Quick Answer
Error code 0x80070091 on your Microsoft Windows means: The directory is not empty. Windows Update cannot remove or replace a directory because it still contains files, often from a failed previous update operation.. This is usually fixable — see the step-by-step guide below.
Affected Models
Applies to all models
Likely Causes
How to Fix It
1
Restart your PC and retry the update — this releases file locks and clears temporary states.
2
Boot into Safe Mode (hold Shift while clicking Restart > Troubleshoot > Advanced options > Startup Settings > Safe Mode) and manually delete the problematic directory if identified in the update log.
3
Clear the Windows Update cache: Open Command Prompt as Administrator, run net stop wuauserv, delete the C:\Windows\SoftwareDistribution folder entirely, run net start wuauserv.
4
Check for the $WINDOWS.~BT folder in C:\ — if present from a failed feature update, delete it. You may need to take ownership first: takeown /f C:\$WINDOWS.~BT /r /d y && icacls C:\$WINDOWS.~BT /grant administrators:F /t && rmdir /s /q C:\$WINDOWS.~BT.
5
Run sfc /scannow and DISM /Online /Cleanup-Image /RestoreHealth to repair any component store issues.
6
Review the CBS.log at C:\Windows\Logs\CBS\CBS.log — search for '0x80070091' to identify exactly which directory is causing the conflict.
Pro Tip
This is a common issue that most users can resolve without specialized tools. Try the first step before moving on to more complex solutions.
Related Error Codes