It is ideal to delete unnecessary folders to free up your device’s storage space. While doing this on Windows, you might sometimes experience that the folders are not getting deleted by any conventional methods.
This can happen if the folder is open in any other program or if you don’t have sufficient privileges to delete it. There are other reasons too, which we shall discuss in today’s article. We will also suggest some fixes to help you easily clean up the folders.
Why Can’t I Delete Folder on Windows?
- The folder is being used by some other programs
- Insufficient privileges to delete the folder
- Malware or viruses
- Issues with the Operating system
- Disk Failure
- Folder is corrupted
How to Fix Folders not Deleting on Windows
Select the folder and press the Shift + Delete key. This will delete the folder permanently without sending it to the recycle bin. This method can work if you have problems sending files to the recycle bin. You can also close all the windows that are opened in the taskbar and try deleting the folder.
If you are getting an error prompt with code 0x80070091 while deleting a folder, rename it and then try to delete it. If the problem persists, restart the device and see if you are able to delete the folder now.
Note: Some Windows Architecture, by default, grants limited user permissions for modifying the folders in order to protect the system’s integrity. In such cases, you won’t be able to delete the folders from the device.
End the Background Processes of the Folder
Most of the time, you cannot delete the file or the folder if it is running in the background. If the files inside that specific folder are active in the system processes, you will be restricted from deleting the folder in this case too. You can manually close all the associated processes of the folder or use the task manager to end their processes.
- Press Ctrl + Shift + Esc to open Task Manager.
- In the list of active processes, find the folder or the process related to it and Right-click on it.
- Click on End task.
- Once the process is killed, try deleting the folder.
Change the Folder Ownership
It is possible that you don’t have ownership of the folder you wish to delete. Having ownership over the folder will give you read, write and modify permissions. Follow these steps, In order to have full control over the folder.
- Right-click on the target folder and select Properties.
- Go to the Security tab.
- Now click on Advanced.
- Click on Change which is next to the Owner name.
- In the enter, the object field, enter your username, and Click on Check Names. It will show the respective username.
- Click on OK. The Owner’s name will now be changed.
- Now check the options Replace owner on sub containers and object, and Replace all child object permissions with inheritable permission entries from the object.
- Click on Apply, and you will have complete ownership of the folder.
You can also do this using the command prompt with elevated privileges.
- Press Windows Key + X and open the Windows Terminal (Admin).
- Now, enter this command. Replace the folder directory with your desired folder.
takeown /F C:\Others
- The ownership of the folder will now change.
- Finally, try deleting the folder. You can delete the folder using this command.
del /f C:\Others
Force Delete Using CMD
You can even force delete the resisting folders using the command-line tools. You can use the
rmdir command for this purpose. This command deletes the folder by bypassing the Recycle bin. You won’t be able to retrieve the folder once you use this command line.
- Press Windows Key + X and open Windows Terminal (Admin).
- Now execute this command line. Replace the folder path in this command with your desired folder path.
rmdir /s C:\Others
Force Delete Using PowerShell
Windows PowerShell boats lots of command-line tools to assist you in managing the folder on your device. You can delete the folder easily using the Remove-Item command. This command is similar to the
rmdir where it force deletes the file by bypassing the Recycle-bin.
- Press Windows Key + R, type
powershell, and hit enter.
- Now execute this command.
Perform Malware Scan
If you are still unable to delete the folder, malware and viruses can be the culprit. Malware sometimes mimics the folder and makes it hard for you to delete it. It may also affect the system process for deleting the folder. To ensure that you are free of malware and viruses, run a scan using Windows Defender or any other Antivirus software.
- Press Windows Key + R, type
windowsdefender:and hit enter.
- Go to Virus and threat protection.
- Click on the Scan options.
- Select Full Scan and click on Scan now.
Run CHKDSK Command
The folder you are trying to delete can be placed in a bad disk sector. You can use the CHKDSK tool to scan the volume where the file is placed and rectify any errors found. To run this scan,
- Press Windows Key + R and type
- Press Ctrl + Shift + Enter to open the command prompt with elevated privileges.
- Type this command and hit enter.
chkdsk /f /r /x