Can't Delete Folder? How to Force Delete Folder in Windows 10/11
Learn how to get rid of unwanted files on your device
7 min. read
Updated on
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
Can’t delete a folder on your PC? You’re in the right place. We outlined straightforward and effective fixes to help you fix this stubborn issue. Just follow the step-by-step guidelines below.
How do I delete a folder that won’t delete Windows 10?
1. Force delete folder in Windows 10 using CMD
- Press the Windows key and type cmd.
2. Right-click on Command Prompt and select Run as administrator.
3. Enter del, followed by the path of the folder or file you want to delete, as shown in the command below:Â
del c:usersJohnDoeDesktoptext.txt
4. Press Enter to run the command.
5. You can repeat the process for all files and folders that you can’t delete by normal means.
If you tried the traditional or removing a folder and it failed, then you need to force delete it. The easiest way to force delete a folder that won’t delete in Windows 10 is via Command Prompt, also known as cmd.
All you need to do is open the tool and input into it a command to remove the folder you want to get rid of, and it will do the job for it.
This method also works for other command line tools such as Powershell, in case you don’t have Command Prompt on your device.
2. Change the Ownership of the file/folder
- Right-click on the file you want to delete and choose Properties.
- Under the Security tab, click the Advanced button.
- The Advanced Security Settings window will appear, and you’ll spot the owner.
- In some cases, SYSTEM is listed as the owner, and in some, it is TrustedInstaller.
- Click on the Change option next to the name of the owner.
- Enter the username you want to become the file owner and click the Check Names button.
- Now, click the OK button.
- Check the box for Replace owner on subcontainers and objects.
- Now, click the Apply button.
- Close Windows Security Properties (Windows will require a restart).
- Now, right-click the file again, and select Properties>Security>Advanced.
- Check the box for Replace all child object permission entries with inheritable permission entries from this object.
- After that, click Edit.
- In the Permission Entry window, check Full Control and hit OK.
- Try to delete the file/folder again.
We have a more in-depth guide on taking full ownership of a file or folder in case you need more information.
3. Use File Explorer with elevated permissions
- Right-click on the Start icon and select File Explorer.
- Locate the folder you want to delete.
- Right-click on it and select properties.
- Go to the Security tab and select Advanced.
- Locate Owner and click on Change.
- Enter your username and save the changes.
Go back to the File explorer and see if you can now delete the folder.
4. Check your antivirus
File protection features in antiviruses can stop you from deleting a folder, even though you have admin rights.
To fix this problem, check your antivirus settings and see if this feature is enabled. If so, disable it for the files you want to delete and check if that solves the issue.
You can also switch your security utility to a reliable antivirus with a high detection rate that is less likely to mistakenly interrupt your day to day activity.
5. Use Powershell
- Press Windows Key + X shortcut and choose PowerShell (Admin) from the menu.
- If PowerShell isn’t available, you can start it by pressing Windows Key + S and entering powershell in the Search field.
- Right-click Windows PowerShell from the list and choose Run as administrator.
When PowerShell starts, enter:Enable-LocalUser -Name "Administrator"
- After doing that, the administrator account should become available and you’ll be able to access it
- If you need to disable the administrator account, you can do it using the following command:
Disable-LocalUser -Name "Administrator"
Another way to enable a disabled administrator account is to use PowerShell.
The problem might be the lack of security privileges if you can’t delete a specific folder on a desktop or other locations. However, you can always try removing those files using a hidden administrator account.
6. Use third-party software to remove locked files
- The third-party software is recommended because it can unlock and remove locked files from your PC. You can choose specific files, file types, and folders to be included in Cleaner operations.
- To include files and folders in the cleaning process, you must select Custom Files and Folders and check the box on the list of the options screen.
- You can then add separate Include statements (as many as necessary) by following these steps each time:
- Click the Options icon from the left sidebar.
- Hit the Include button.
- Add a new include statement by clicking Add.
- Complete details in the Include dialog box.
Alternatively, you can utilize PC repairing software to help you repair various Windows issues in your system. This is how you can force delete a folder in Windows 10 with software.
7. Remove AMD Uninstall Utility
Sometimes, third-party applications can cause this problem to appear. For example, if you can’t delete files or folders on your PC, the issue might be caused by the AMD Uninstall Utility.
Find this application on your PC and remove it to fix this problem. There are several ways to do that, but the best way is to use uninstaller software.
These tools are designed to remove applications and all files and registry entries associated with the desired application.
After completely removing the problematic application, the issue should be resolved, and you’ll be able to delete files again.
9. Use Microsoft’s Troubleshooter
- Download the troubleshooter.
- Start the troubleshooter and click Next.
- Follow the instructions on the screen to complete the troubleshooting process.
After the troubleshooter is finished, check if the problem persists.
10. Use Safe Mode
- Open the Start Menu.
- Click the Power button.
- Press and hold the Shift key and choose Restart from the menu.
- Wait for your PC to restart and select Troubleshoot.
- Select Advanced options and click on Startup Settings.
- Now, click the Restart button.
- Select any version of Safe Mode by pressing the appropriate keyboard key.
Once you enter Safe Mode, try to delete the problematic file or directory again.
Keep in mind that this is just a workaround, but it can be helpful if you need to remove just a couple of files or folders from a specific directory.
If you can’t boot into Safe Mode, you can try doing it from the Power Menu or with the help of third-party software.
11. Use the chkdsk command in cmd to check for PC errors
- Run Command Prompt as administrator, as shown in solution 3.
- Type the following command and press Enter to run:
chkdsk /f
- Click YES when prompted if you want to run it at the next start.
- Restart your PC.
The chkdsk scan will fix any potential errors, and some users reported fixing this problem after performing it, so make sure you try it.
Why can’t I delete a folder on Windows 10?
Here are some of the most common causes that prevent you from deleting a folder in Windows 10:
- Can’t delete folder in use – To fix the problem, you need to close all applications that might be using this directory. We covered a similar problem in our File in use error article, so check it out for more information.
- Cannot delete file access denied – This error message can appear if you don’t have the necessary privileges to delete a specific file or folder. Change your security permissions, and you can force delete the file.
- Can’t delete folder open in another program – By default, Windows prevents you from deleting files currently used by other applications. To fix this error, ensure that other applications aren’t using that file.
- Can’t delete files with long names – Windows can’t work well with files that exceed a specific character limit. We explained how to force delete a folder in Windows 10 with long file names in our The filename or extension is too long article, so be sure to check it out for more information.
- Can’t delete files need permission – This is just a variation of this error, but in most cases, you can fix it simply by changing your security permissions.
- Can’t delete folder Windows 10 could not find this item, no longer located – This happens when the folder has been already deleted, but the icon still shows up.
- Can’t delete folder Windows 10 as administrator – You can enter Safe Mode, then try again to delete the folder as an admin.
- Force delete folder Windows 10 the directory is not empty – Check out our 7th solution to learn how to force delete a folder.
If you have some alternate solutions for this problem and want to share them with us, please write them down in the comments below. Our readers would love to read it.
User forum
17 messages