Deleting a file is one of the most basic tasks we perform on our computers. However, when a file refuses to delete, this simple task can become a chore. This is a common issue that occurs when the file is active in the system processes or is used by another program.

Generally, closing the file or its background processes solves the issue. If this does not resolve the problem, you have other options for removing the files.

Why Can’t I Delete File on Windows?

How to Fix Files Not Deleting on Windows?

Usually, minor bugs in the operating system can prevent you from deleting a file. Such bugs can get fixed with a system restart. Also, before you begin with the other fixes for this problem, try topermanently deletethe file by bypassing the recycle bin. To do this, simply select the file and press the Shift + Del key.

File-extension-of-the-file-to-be-deleted-1024x714

If the problem persists, try these fixes to delete the files.

End the Background Process

If the files are opened in the background, they resist getting deleted. These files remain in a locked state while they are in use.  To resolve this issue, end the background processes related to the file and then attempt to delete it.

Another possibility is that the file that refuses to be deleted is being used by another program. While attempting to delete the file, users may receive an error message stating, “The action can’t be completed because the file is opened in another program”. Deleting the file is only possible after closing the program that is using it.

End-the-process-of-the-file-to-be-deleted-1024x712

The resource monitor terminates the application and its other processes using the file. Finally, you will be able to delete the file.

Change the File Attribute

The files withRead-only attributesassigned to them will not grant you permission to edit, modify or delete it. you may revoke the read-only attribute assigned to the file and then delete it.

Take Ownership of the File

Having ownership over a file gives you the privilege of accessing and modifying the file. If you do not own the file, you will be unable to delete it. Using thetakeowncommand, you may gain complete control of the file and easily delete it. Here’s how to put it to use.

End-the-process-tree-of-the-application-using-the-file-1024x717

Force Delete the File

Properties-of-the-file-you-want-to-delete

change-the-attributes-of-readonly-file

takeown-command

delete-a-file-using-cmd

delete-a-file-using-cmd-1