Windows is known to stop users from deleting files and folders due to various reasons. The folder can be open when the user tries deleting it, or it might be due to a virus, or maybe it is a Windows system file that you cannot delete without certain permissions.
Whatever the reason, it can be annoying to be unable to delete a file that you want to. If you are facing the same problem, then here I have discussed how to delete a file that cannot be deleted on Windows 10.
Why Can’t I Delete This File Or Folder?
If you are unable to delete a file or folder on Windows 10, here are the possible reasons for it:
- Windows does not allow the deletion of any file or folder, open in Windows, or being used by another application. This is the common case for not being able to delete a file or folder.
- Another common issue that can stop users from deleting a file or folder is if the computer has been attacked by a virus or malware.
- Users are also restricted to delete Windows system files if they do not have the required permissions. If you are trying to delete a system file, it is likely that you don’t have the necessary permissions to do it.
These 3 are the most likely reasons that you are unable to delete the file. When you are not able to delete a file normally, you can use unconventional methods to force delete the folder or file. So, how do I force delete a folder? I have mentioned some methods below that you can use to force delete folder in Windows 10.
How Do I Delete A File That Cannot Be Deleted?
So, how do I delete a file that cannot be deleted? If you are unable to delete a file on Windows 10, there is likely a reason behind it. If you take care of that issue, which is stopping Windows from deleting that file or folder, then you should be able to delete it.
Restart Your Computer
This is the first thing you should do when you come across this issue. If the file or folder is open on your PC without your knowledge, then shutting down the PC should close it down. Simply, shut down your PC and restart it. After the computer boots in desktop, check if you can delete that file or folder. If the issue persists, try the nest method.
Use The Task Manager
If the file is in use by other applications, then Windows won’t allow you to delete it. So, how do I delete a file that cannot be deleted in such cases? In such cases, you can use the Task Manager to end the app process that is using the file and then delete it. To do it, follow the steps given below:
- Press Ctrl + Shift + Esc to open the Task Manager.
- In the General tab, locate the app process that is using the file. Once you have located it, right-click on it.
- Finally, click on End Task to stop the app process.
After you have stopped the app process using the file or folder, try deleting the file and see if you can or not.
Another prominent issue behind not being able to delete a file is getting attacked by malware and viruses. Computers that are affected by malware and viruses behave weirdly. One of the most common symptoms is not being able to delete certain files or folders that the users should be able to. In these scenarios, you can try running an antivirus to check and remove any malware or virus on your PC.
If you don’t have a 3rd party antivirus like Avast, you can use the Windows Defender, the native Windows 10 antivirus. To use Windows Defender to conduct a Full Scan of the computer, follow the steps given below:
- Type Windows Security in the search bar and select the top option.
- Next, click on the Virus & threat protection option.
- Select the Scan options below the Quick scan.
- Check the Full Scan circle and click on Scan now.
- Wait for the scan to finish.
After the antivirus has completed the scan, try deleting the file that you were unable to delete unless the antivirus didn’t do it first. However, if still you can’t delete it, then try the methods below to force delete folder in Windows 10.
How Do I Force Delete A Folder In Windows 10?
To delete a file that cannot be deleted normally, you will have to force delete it. Before I explain more, I want to clear that I am not talking about system files here. You cannot delete the system files with normal methods. Deleting a system file can crash the entire system, which is why Windows doesn’t allow users to do so.
Now, coming back to the topic, you can use Command Prompt or enter Safe Mode to forcefully delete a file in Windows 10.
How Do I Force Delete A Folder Using Command Prompt?
The easiest and fastest way to force delete folder in Windows 10 is by using the Command Prompt. To use the Command Prompt for force deleting a file, follow the steps given below:
- Press the Windows + R keys to open the Run utility.
- Type cmd and press Ctrl + Shift + Enter to open an elevated Command Prompt.
- Now, type the following command and press Enter:
del /f <file path>
Replace the “file path” with the actual path of the file or folder you want to delete.
Example: del /f E:\Sanmay\Junk.txt
- After the process finishes, close the Command Prompt.
Now, check whether the file has been deleted or not.
How Do I Force Delete A Folder By Entering Safe Mode?
When you enter Safe Mode, you get to delete any file forcefully. If the file wasn’t deleted after using the above method, you can try entering Safe Mode and deleting it from there. To enter Safe Mode, follow the steps given below:
- Right-click on the start menu and select the Settings option. This will open the Settings app on your screen.
- Click on the Update and Security option.
- Next, select the Recovery option.
- Now, click on the Restart Now option in the Advanced Startup section. The computer will now restart into Advanced Startup Settings.
- Click on the Troubleshoot option after the PC restarts.
- Next, click on the Advanced Options.
- Select the Startup Settings option and press F4 on your keyboard to restart your computer and boot in Safe Mode.
After you have entered the Safe Mode, try deleting the file or folder that you were unable to delete.
How To Access WindowsApps Folder And Delete The Files Inside It?
The WindowsApps folder is where Windows 10 stores all app data and cache files. Windows doesn’t allow access to this folder even if you have login with your administrator account. This is to protect the app data of your PC from unintentional delete and malware or virus attacks. How do I delete a file that cannot be deleted in WindowsApps? To do it you have to access the WindowsApps folder first.
The folder is owned by the System, which is why users cannot access it with administrator accounts. So, how to access WindowsApps folder? To access WindowsApps folder and delete the unnecessary files in it, you need to take ownership of the folder. To take ownership of the WindowsApps folder, follow the steps given below:
- Navigate to the C:\Program Files\ and click on the View Check the Hidden Items box to view the WindowsApps folder.
- Right-click on the WindowsApps folder and select the Properties option.
- Click on the Security tab and select the Advanced option.
- Select the TrustedInstaller permission in the Permission entries section and click on the Change option.
- Enter the account username in the Enter the object name section.
- Click on the Check Names option to verify it and select OK to save the changes.
- Check the Replace owner on subcontainers and objects box and click on Apply and OK to save the changes.
Now you can access the WindowsApps folder and delete any unnecessary files that don’t want.
So, there you have it. Now the question “How do I delete a file that cannot be deleted?” should be answered. If you have any questions regarding this topic, ask them in the comment section below.