There can be many situations where Windows may prevent you from deleting a particular file. The file might be in use, you may not have the privilege to access it, or the file itself may have an issue. Whatever the reason, it can be quite frustrating to see unwanted files in your PC.
If you are having a hard time trying to delete a stubborn file, let me give you a helping hand. In this post I’ll share five solutions to delete an undeletable file in Windows. Just choose the right solution according to your situation.
1. Close associated program/process
It’s a quick and dirty way to solve the problem, but it usually gets the job done if you have enough information. Windows won’t delete a file if it is currently being used by a program. If there is a program that still has the file opened in it, simply close the program and try deleting it again.
Furthermore, there is a chance a program might have a hidden process that may still be using the file. Therefore, even when no program has the file opened in it, Windows will still say that a program is using the file.
To fix this, press the Ctrl + Shift + Esc keys to fire up the Task Manager and move to the processes tab. Look for a process associated with a program that could open your particular file. The “Description” section will help you find the right process. Once found, select it and click on “End Process” to stop it. You should be able to delete the file now.
2. Take ownership of the file
If Windows is giving an error that you don’t have the privilege to delete the file, then it must be an ownership issue. Usually, this happens when you upgrade Windows or there are multiple user accounts. Thankfully, if you are the administrator of the PC, you can easily take back ownership of any file and then delete it.
Although there is a manual method to take back ownership in Windows, it’s a bit complicated and prone to errors. Therefore, I personally use and recommend a third-party app called Take Ownership that could help you take back ownership with a single click.
Download and install the app, and it will create a context menu entry named “Take Ownership.” Then simply right-click on the file you want to take ownership of and select “Take Ownership” from the context menu. You’ll immediately become the owner and can delete or modify the file as you please.
3. Use a third-party app
There are also third-party apps that could fix common problems that lead to a file getting locked and unable to delete. Many times I have used the IObit Unlocker app for this purpose, and it has always managed to fix the problem. For me, it even fixed the “too long name” error that makes a file undeletable. If the above two methods didn’t work out, then you should give IObit Unlocker a try.
Once you have installed the app, it will let you unlock files and folders through both a dedicated interface and a context menu entry. You can either drag and drop files in the IObit Unlocker interface or right-click on the file and select “IObit Unlocker” from the context menu.
Once the file is added, you can either use normal mode or force mode to unlock a file. The force mode will stop all connected processes with the file. There is also a command to directly unlock and delete the file right from the IObit Unlocker interface.
4. Restart the PC
Even if IObit Unlocker failed to make your file deletable, there must be a file or system error. In most cases, a simple reboot is all you need to fix such issues. Restart the PC and try deleting the file. Additionally, you can again try using IObit Unlocker after the reboot, as it may work this time.
5. Boot into Safe Mode
If nothing works, then either the file is infected by malware, or the system itself is using the file. In both cases booting your PC into Safe Mode should allow you to delete the file. Safe Mode only loads the minimum of required drivers and system files, and most types of malware are also halted.
You can access Safe Mode in Windows 7 by repeatedly pressing the F8 key while the PC is starting. The process is a little different in Windows 8 and 10, so we are also including the instructions to access Safe Mode in Windows 8 and Windows 10. Once in Safe Mode, delete the file and restart the PC to enter the normal mode.
If you deal with this issue often, then I recommend you get IObit Unlocker. Every time the issue arises, you’ll just have to do a few clicks to fix it without having to figure out first what caused the problem. Other than that, the first two solutions will also allow you to delete undeletable files most of the time.
Our latest tutorials delivered straight to your inbox