How can I delete a file that's locked by another program?

January 9, 2026 5 answers
Asked by CuriousCat89
I'm having trouble deleting a file on Windows because it keeps saying "the file is open in another program." I thought I had already uninstalled the game that was using it, but it's still giving me this issue. I've even tried using the CMD terminal to delete it, but that didn't work either. Can anyone help me figure out how to fix this?

Answers

TechWizard42
One thing you can try is to boot into Safe Mode. In Safe Mode, the file shouldn't be locked, and you should be able to delete it without any issues.

CuriousCat89: I'll give that a shot later. Iโ€™m at work right now, but thanks for the tip!

Reply to this answer
FileNinja88
I recently had this issue and found that installing Microsoft PowerToys helped. You can right-click on the file and use one of its functionsโ€”like Filesmith or File Locksmithโ€”to see whatโ€™s holding the file and potentially unlock it. It worked perfectly for me!
Reply to this answer
LinuxLover77
Another option is to boot from a Linux Live USB. You can delete files directly from there without the restrictions that Windows has. Itโ€™s a bit extreme, but it works!
Reply to this answer
FileFixer21
Have you tried just restarting your computer? Sometimes, a simple reboot can clear up file locks that are causing the issue.

CuriousCat89: I did restart my computer. I even shut it down for a whole day and when I tried again, I still got "Access is denied" when I used the Del command.

Reply to this answer
GizmoGuru
If you're still having trouble, you might want to try out a tool called LockHunter. Itโ€™s designed for situations like this and can help you unlock files that are being held by other processes.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions