Home > Windows

Cannot Delete File/Folder in Windows 11: How to Fix

In this guide, we will show you various methods to fix the issue of being unable to delete files and folders in Windows 11. There might be a few instances when you were about to delete a file or folder but the system prevents you from doing so. Rather, you will be greeted with the following error message: “The action can’t be completed because the folder or file in it is open in another program.” Now as far as the reason for this issue is concerned, there could be quite a few ones, with the major one being that the file might be currently in use.

Apart from that, one of its background processes might be currently in use, it is being remotely accessed, it is currently part of the thumbnail caching, due to Controlled Folder Access, or a third-party app is currently in possession of this file. If you are also currently bugged with this issue, then this tutorial shall help you out. In this guide, we will make you aware of various methods to fix the issue of being unable to delete files and folders in Windows 11. Follow along.

How to Fix Cannot Delete File and Folder in Windows 11

Cannot Delete File in Windows 11

Do note that there’s no universal fix as such. You will have to try out each of the below-mentioned workarounds and see which one works best in your favor. So with that in mind, let’s get started.

FIX 1: End App’s Process Tree

  1. To begin with, use the Ctrl+Shift+Esc shortcut keys to open the Task Manager.
  2. Then go to the Details tab, right click on the the app’s exe file and select End Process Tree.
    Cannot Delete File in Windows 11
  3. After that, go to the Processes tab and scroll to Background Process.
  4. Make sure none of its instances is running in the background. If it’s there, then select it and hit End Task.
    Cannot Delete File in Windows 11
  5. Once done, check if it fixes the issue of being unable to delete files/folders in Windows 11.

FIX 2: Disable Remote Access

  1. Open the Run dialog box via Windows+R shortcut keys and type in the below command
    compmgmt.msc
  2. This shall open Computer Management. So go to System Tools > Shared Folders > Open Files from the left menu bar.
  3. Now right click in an empty location and select Disconnect All Open Files.
    Cannot Delete File in Windows 11
  4. This will cut off the app’s remote access, if it was being access across the network.
  5. Now check if the issue of being unable to delete files/folders in Windows 11 has been fixed or not.

FIX 3: Restart File Explorer

In some instances, the File Explorer might be having the control of that particular file or folder and hence it might prevent the deletion of that file or folder. So you should try stopping the Explorer and then restart its fresh instance. Here’s how:

  1. Bring up the Task Manager via Ctrl+shift+Esc shortcut keys.
  2. Then select Windows Explorer and hit Restart.
    Cannot Delete File in Windows 11
  3. After that, go to the Processes tab, select explorer.exe and hit End Task.
  4. Now check if it fixes the issue of being unable to delete files/folders in Windows 11.

FIX 4: Disable Thumbnail Caching

Windows stores the thumbnail of the files in the thumbs.db file. The meta data of this file gets refreshed at regular intervals, as and when there’s a recreation of the thumbnails. And when that is happening, you would’t be able to delete that file or folder. So should you consider temporary disabling the thumbnail caching process, which could be done as follows:

  1. To begin with, enable the Local Group Policy Editor on your PC.
  2. Then bring up the Run via Windows+R shortcut and type in the below command:
  3. This shall open Group Policy Editor. Now go to the below lciation from the left menu bar:
    Local Computer Policy > User Configuration > Administrative Templates > Windows Components > File Explorer
  4. Now double-click on Turn off the caching of thumbnails in hidden thumbs.db file.
    Cannot Delete File in Windows 11
  5. After that, select Enabled. Then click Apply > OK.
    Cannot Delete File in Windows 11
  6. Check if it fixes the issue of being unable to delete files/folders in Windows 11.

FIX 5: Delete Temporary Files

If a lot of temporary data gets acrued over the due course of time, then it could conflict with the deletion of the files and folders. Therefore, you should delete these temporary files at regular inervals, and now is just the right time to do so. So proceed with the below instruction steps to try it out:

  1. Bring up the Run dialog box via Windows+R shortcut key, type in the below command, and hit Enter:
    %temp%
  2. This will take you to the Temporary data folder.
    Cannot Delete File in Windows 11
  3. Select all the files via Ctrl+A and then hit the Delete button.
  4. Now check if it fixes the issue of being unable to delete files/folders in Windows 11.

FIX 6: Disable Controlled Folder Access

If you are trying to the delete a file or folder which is present in the system directory, then the Controlled Folder Access feature might prevent you from doing so. For the unware, this is a security mechanism put in place by the OS that adds an additional layer of security for the deletion of files from the C drive. While it is a quite a handy feature, it could well be the reaosn behind the underlying issue as well. So you should consider disabling this functionality for the time being  and then check out the results.

  1. Head over to the Start menu, search Virus and Threat Protection, and open it.
  2. Then click on Manage Settings under Virus and Threat Protection Settings.
  3. After that, click on Manage Controlled folder access.
    Cannot Delete File in Windows 11
  4. Now turn off the toggle next to Controlled Folder Access.
    Cannot Delete File in Windows 11
  5. Check  if it fixes the issue of being unable to delete files/folders in Windows 11.

FIX 7: Boot to Safe Mode

In some instances, a third-party app might be using that file or folder but the same might not be visible under the Processes section of Task Manager or the Task Scheduler. To verify if that the case or not, you should boot your PC to safe mode, which will disable all the third-party apps. If you are then able to delete that file/folder, the culprit was indeed an third-party app. So on that note, you may refer to our guide on How to Boot Windows 11 to Safe Mode. The shorter instruction follows below:

  1. Keep pressing the Shift button and then click on the Power button > Restart.
  2. After that, select Troubleshoot > Advanced Options > Startup Settings and click Restart.
    Cannot Delete File in Windows 11
  3. Now press the F4 key to enable Safe Mode. Your PC will now boot to this mode.
    Cannot Delete File in Windows 11
  4. Try deleting that file or folder, you shouldn’t face any issues now

So with this, we round off the guide on how you could fix the issue of being unable to delete files/folders in Windows 11. We have listed seven different methods for the same. Do let us know in the comments section which method spelled out success for you. Likewise, all your queries are welcomed in the comments section below.


Share: