Fix Error 0x80070091: The Directory is not empty

There are times when you may encounter an unexpected error while using any of the Windows computer operating systems. Such error can be unexpected because you will most likely not to be in a position to tell why the error occurs. One such error is Error 0x80070091, which is usually accompanied by a message indicating “An unexpected error is keeping you from deleting the folder. Error 0x80070091: The directory is not empty

Although the message clearly indicates that you can not delete a folder you attempted to delete, the part indicating that “the directory is not empty” can leave you very confused about what the message actually means.

The most likely moment when you may encounter error 0x80070091 is when deleting a file or folder from any section of your computer. This may lead to such other issues as inability to install any apps and/or updates from the Windows Store.

The Error 0x80070091 Can occur if;

  • You do not have administrative rights to the computer, which prevents you from deleting any file or folder.
  • Your computer’s hard drive has bad sectors.
  • Corrupt or damaged drivers.
  • Too much junk files in the temporary locations folder.


Fixing Error 0x80070091 The Directory is not empty


How to fix error 0x80070091


Although the error may appear as a minor issue at the beginning, it can make it impossible for your to perform some tasks on the computer. It is therefore important that you fit it at the earliest opportunity possible. You can fix it in different ways depending on the cause


Method 1 – Simple Housekeeping Measures to fix Error 0x80070091

Performing simple housekeeping measures can be very helpful in fixing the error.

  1. Run a full-scan of the installed anti-virus/malware program unless it is impossible because of the error.
  2. Make sure that you are using the computer with full administrative rights.

Perform these two simple actions before restarting the computer and attempt to delete the file or folder to see whether or not the error 0x80070091 still occurs.


Method 2 – Remove Junk Files

Accumulated junk files on your computer can be a cause of many errors including error 0x80070091. Removing such files on a regular basis can be helpful in preventing the same.

[wpsm_list type=”arrow”]

  • Press Win + X key to open up menu
  • Select “Command Prompt (Admin)” option.
  • Click “Yes” to run command prompt as an administrator.
  • Type “cleanmgr” before hitting Enter.
  • The tool will begin to run automatically and will calculate how much used space you can claim on the hard disk. Check all the dialogue boxes occupied by unnecessary files including the temporary files box.
  • Click “OK” to let the tool remove all junk files.
  • Attempt again to delete a file or folder you intended to delete to see if the 0x80070091 error is resolved or not.



Method 3 – Own the File/Folder

There is usually the possibility that you may not be able to delete a file or folder even when you are logged on to your computer as the administrator. It becomes necessary to check such a file’s or folder’s properties to see if you indeed have full administrative rights over it.

[wpsm_list type=”check”]

  • Click to open Windows Explorer.
  • Open the parent directory of the file or folder you intend to delete.
  • Right-click on the file or folder before selecting its properties.
  • Click on its security tab> Advanced> Owner.
  • Change the file’s or folder’s ownership to “New Owner”.
  • Select “Replace Owner” in both “Sub-container and Objects”.
  • Close before attempting to delete the file or folder to see if the issue is resolved.



Method 4 – Run System File Checker

Running the built-in system file checker tool can be helpful in resolving the error. The tool scans and attempts to repair corrupt files that may be the cause of the error.

[wpsm_list type=”star”]

  • Click “Start
  • Type “cmd” in the “Search programs and files” box.
  • Press the combination of CTRL + Shift + Enter before clicking “OK” to open command prompt.
  • Type “chkdsk/f/r” into the prompt before hitting Enter.
  • Type “Y” in response to the resultant notification.
  • Restart the computer to allow disk check to run. You need to give the tool time to complete before attempting to delete the file or folder to see if the error is resolved.



Method 5 – Run Disk Check Tool

The built-in disk check (chkdsk) utility is similar to file checker except that it focuses more on repairing bad sectors on the hard disk. Running it can be very helpful in resolving many errors including error 0x80070091.

1. Press Win + X key to open up menu.
2. Select “Command Prompt (Admin)” option.
3. Click “Yes” to run command prompt as an administrator.
4. Type chkdsk C/f/r/x.
5. Press “Enter” to run the scan and let it complete before restarting your computer and deleting the file or folder you intend to delete to see whether or not the error 0x80070091 is resolved.


Method 6 – Update Computer Drivers to fix error 0x80070091

Updating computer drivers will only be effective in case the error occurs because of damaged or outdated drivers, which is usually a cause of many other Windows errors.

Step 1. Right-click on “My Computer” before selecting “Properties”.

Step 2. Select “Device Manager”.

Step 3. Navigate through all the devices listed while looking out for any device with a yellow exclamation mark.

Step 4. Right-click on any such device before choosing “Update Driver”.

Step 5. Restart your computer after the update before attempting to delete the file or folder to see of the issue is resolved or not.


Method 7 – System Restore

Running system restore should be effective in resolving the error inn case any of the above methods fails.

[wpsm_list type=”bullet”]

  • Press Win + Q keys.
  • Click on “Settings
  • Choose “Recovery” icon.
  • Select “System Restore” from the resultant open window.
  • Choose an earlier date when your computer worked without any issues.
  • The tool should start to run before shutting down the computer and restarting it again.
  • The file should be deleted or you will be able to delete it without any 0x80070091 code problem .



Method 8 – Fresh Installation of OS

This should be your last option in resolving error 0x80070091 in case any of the above methods and the system restore fails to resolve the error. Although it can be time-consuming, it is usually beneficial because you start off with fresh files without any issues.

5 thoughts on “Fix Error 0x80070091: The Directory is not empty”

Leave a Comment