0x80070091 - The directory is not empty
0x80070091 Microsoft name: ERROR_DIR_NOT_EMPTY
What it means
Windows could not delete or move a folder because it still contains files.
Where you see it
Deleting a folder, uninstalling an app, or an update step.
Likely causes
- Hidden or in-use files inside.
- A program is using the folder.
- Leftover files.
Three safe steps, in order
Try them one at a time and test after each. No registry edits, no repair tools to buy, and no switching off your security. If a step needs a driver, firmware or Windows installation media, get it only from Microsoft or your device maker.
- Close programs that might be using the folder, restart, and try again.Related Microsoft page: Fix problems that block programs from being installed or removed
- Open the folder (turn on View > Show > Hidden items), move anything you want to keep, and delete the folder only if you are sure nothing inside is needed.Related Microsoft page: Fix problems that block programs from being installed or removed
- If it keeps happening, back up your files and run chkdsk.Related Microsoft page: chkdsk command reference
Stop and get help when…
the folder is inside Windows or Program Files. Do not delete system folders.
Source and date
- Official Microsoft reference
- System Error Codes (WinError.h)
- More Microsoft help
- Use the System File Checker tool to repair missing or corrupted system files
- Date checked
- 24 November 2026. Microsoft changes its pages; if a step no longer matches, trust the Microsoft page.
Win32 error 145 wrapped as an HRESULT (0x8007xxxx)
Microsoft describes it as: “The directory is not empty.”
Source: System Error Codes (WinError.h) (Microsoft Learn content, CC BY 4.0)
The wording above is ours. Where a box quotes Microsoft's description, it comes from Microsoft Learn documentation published under CC BY 4.0 and is credited to the page linked.