System Restore error 0x80070091 on Windows 10 stops a restore point from being applied, usually because a folder contains files or permissions that Windows cannot process. The fix is to identify the problematic folder (often in WindowsApps or a user profile), take ownership of it, and then either delete the offending item or run the restore again. Below is a practical, step-by-step guide, plus background on why this error occurs and how to prevent it.
What Causes Error 0x80070091?
The error code 0x80070091 translates to ERROR_DIR_NOT_EMPTY – “The directory is not empty.” During a system restore, Windows tries to replace or delete folders that were changed since the restore point. If a folder contains files with unusual permissions, long paths, or system attributes, the restore process cannot remove it, and the whole operation fails.
Common culprits include:
- The
C:\Program Files\WindowsAppsfolder, which holds Microsoft Store apps and has strict ACLs (access control lists). - User profile folders with corrupted or orphaned data.
- Folders with names longer than the MAX_PATH limit (260 characters).
- Antivirus or backup software that locks files during the restore.
How System Restore Works (and Why It Fails)
System Restore takes a snapshot of critical system files, registry keys, and some program files. When you roll back, Windows copies those snapshots over the current state. It does not touch personal documents, but it does replace system files and installed drivers. The process uses the Volume Shadow Copy service (VSS) to create and apply snapshots.
If a file or folder is locked by a running process, or if the restore operation lacks permission to modify an object, VSS reports an error. The 0x80070091 error specifically means the directory is not empty, so Windows cannot delete it to replace it with the older version. This often happens when a folder contains files that were created after the restore point – Windows tries to remove them but fails.
Before You Start: Safety and Preparation
System Restore is generally safe, but it can remove recently installed apps and drivers. Before attempting any fix:
- Back up important personal files to an external drive or cloud service.
- Note any software installed after the restore point – you may need to reinstall it.
- Close all running applications to avoid file locks.
- If you are using a laptop, ensure it is plugged in to avoid power loss during the process.
Do not skip these steps – a failed restore can leave Windows in an inconsistent state, though it usually remains bootable.
Fix 1: Run System Restore in Safe Mode
Safe Mode loads only essential drivers and services, which often bypasses file locks caused by third-party software. To run System Restore in Safe Mode:
- Open Settings > Update & Security > Recovery.
- Under Advanced startup, click Restart now.
- After the PC restarts, choose Troubleshoot > Advanced options > Startup Settings > Restart.
- Press F4 to boot into Safe Mode.
- Once in Safe Mode, search for “Create a restore point” in the Start menu, open the System Properties dialog, and click System Restore.
- Choose a restore point and follow the wizard.
If this works, the error was likely due to a locked file. If it still fails, move to the next fix.
Fix 2: Identify and Delete the Problem Folder
Windows often logs the exact folder that caused the failure. To find it:
- Open Event Viewer (type “eventvwr” in Start).
- Go to Windows Logs > Application.
- Look for an Error event with source VSS or Service Control Manager around the time of the failed restore.
- Read the details – it may list the folder path, such as
C:\Program Files\WindowsApps\Microsoft.SkypeApp.
If you find the folder, you need to take ownership and delete it. Here is how:
- Open File Explorer and navigate to the parent folder (e.g.,
C:\Program Files). - Right-click the problematic folder and select Properties.
- Go to the Security tab, click Advanced, then next to “Owner” click Change.
- Type your username, click Check Names, then OK.
- Check “Replace owner on subcontainers and objects” and click OK.
- Back in the Security tab, click Edit, select your user, and check Full control under Allow. Apply to all.
- Now try to delete the folder. If it says the folder is not empty, open it and delete files individually. Some files may require taking ownership of subfolders as well.
Be extremely careful – only delete folders you are certain are not system-critical. For WindowsApps, it is safer to use PowerShell to uninstall the problematic app instead of manually deleting files.
Fix 3: Use Disk Cleanup to Clear System Files
Sometimes the error is caused by leftover temporary files or corrupted system files. Disk Cleanup can remove these and may clear the obstruction.
- Search for “Disk Cleanup” and run it as administrator.
- Select the drive where Windows is installed (usually C:).
- Click Clean up system files.
- Check Previous Windows installations, Temporary files, and Thumbnails.
- Click OK to delete them.
This also frees up space, which can help System Restore run more smoothly.
Fix 4: Disable Antivirus Temporarily
Third-party antivirus software can lock files and interfere with System Restore. Temporarily disable it (usually via its system tray icon) and try the restore again. Remember to re-enable it immediately after. Do not disable Windows Defender unless you have another active antivirus.
Fix 5: Use DISM and SFC to Repair System Files
Corrupted system files can also cause restore failures. Run the built-in repair tools:
- Open Command Prompt as administrator.
- Run
DISM /Online /Cleanup-Image /RestoreHealth– this may take several minutes. - Then run
sfc /scannow. - Restart your PC and try System Restore again.
These tools do not delete personal files, but they can fix underlying issues that prevent restore from completing.
Frequently Asked Questions
Will I lose my personal files if I use System Restore?
No. System Restore only affects system files, drivers, and installed programs. Your documents, photos, and other personal data remain untouched. However, any apps installed after the restore point will be removed, and some settings may revert.
Can I fix error 0x80070091 without deleting any folders?
Yes, sometimes. Try Safe Mode first, then Disk Cleanup, then SFC/DISM. If those fail, you may need to delete the specific folder that is blocking the restore, but that is usually safe if it is a temporary folder or a leftover app cache.
Why does the error mention WindowsApps specifically?
WindowsApps is a protected system folder that stores Microsoft Store apps. It has strict permissions that prevent even administrators from modifying it easily. When System Restore tries to replace an app that has been updated since the restore point, it may fail because the folder is not empty or has locked files.
Is there a way to avoid this error in the future?
Keep your system clean: uninstall apps you don’t use, run Disk Cleanup regularly, and avoid manually deleting files from Program Files or WindowsApps. Also, ensure you have enough free disk space (at least 10% of your drive) for System Restore to work properly.
What if none of these fixes work?
If you still get the error, you can try creating a new restore point and then restoring to that one, or use the “Startup Repair” option from the Advanced Startup menu. As a last resort, you can reset your PC (keeping or removing files) or reinstall Windows, but those are more drastic steps.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Gmail Gemini Privacy: Data Access & Limit Settings
- Fix Outlook Inbox Corruption with DISM in Windows
- How to Set Up Apple Pay on iPhone
- How to Choose a Refurbished iPhone With Years of Support
- Voice Dictation in Google Docs: How to Use It
- Turn Off Message Notifications on Mac