Force Delete a File in Windows 10 or 11: A Step-by-Step Guide

One of the most frequent issues Windows users face is being unable to delete a file, especially if it’s being used by another program or has been locked by the system. In such cases, you need to force delete the file in order to permanently eliminate it from your system.

Here are the steps to force delete a file on Windows 10 or Windows 11.

Close the program or process that is using the file.

First and foremost, close any program or process using the file. If it’s active, you won’t be able to delete it until its use by that program or process has been ended.

Eliminate Processes with Task Manager

If you are unable to terminate a program or process using standard methods, Task Manager can be used instead. Press Ctrl + Alt + Delete on your keyboard and select Task Manager from the list. In the Processes tab, locate and select the process using your file and click on its “End Task” button to terminate it permanently.

Utilize the Command Prompt

If none of the above methods work, you can try using the command prompt to force delete the file. Open up as an administrator and navigate to where the file resides; then type “del” into the command prompt to eliminate it. For instance, if it’s in “C:\Users\Username\Desktop”, enter this command:

del "C:\Users\Username\Desktop\test.txt"

Use a Third-Party Tool

If the above methods don’t work, you can try using a third-party tool to force delete the file. There are several such programs online such as Unlocker, IObit Unlocker and FileASSASSIN that allow users to delete files that are in use or locked by their system.

Restart Your Computer in Safe Mode

If all other methods fail, try restarting your computer in Safe Mode and attempting to delete the file. In Safe Mode, only essential programs and services are loaded – sometimes this allows for successful deletion of a file. To restart in Safe Mode, follow these steps:

  1. To open the Run dialog box on your keyboard, press either Windows key + R or enter ‘Run’ directly into your search engine.
  2. Type “msconfig” and press Enter.
  3. To configure boot behavior on Windows 10, go to the System Configuration window and select Boot from the dropdown list.
  4. Make sure the “Safe boot” option is selected and select “Minimum” from the dropdown menu.
  5. Click on both “Apply” and “OK” buttons.
  6. Restart your computer.
  7. Once in Safe Mode, attempt to delete the file again.

Check the File’s Attributes

Sometimes, a file’s attributes can prevent its deletion. To check these attributes, right-click on the file and select “Properties”. In the Properties window, go to the General tab and look for the Attributes section. If any “Read-only” or “System” attributes are checked, uncheck them and try deleting again.

Take Control of the File

If you do not have the permissions to delete a file, you can try taking ownership. To do this, right-click on the file and select “Properties”, then navigate to the Security tab, clicking on “Advanced.” On that same screen, click on the Change button next to “Owner.” In Select User or Group window, enter your user name and click on the “Check Names” button before clicking ‘Ok’ to confirm changes.

Utilize the “rd” Command

If a file is located in a folder that contains other files and folders, you may need to use the “rd” (remove directory) command to delete its entirety. To use this command, open up the command prompt as an administrator and navigate to where your file resides. Type “rd” followed by its path – for instance if it were in “C:\Users\Username\Desktop\Test”, you would enter “rd”.

rd "C:\Users\Username\Desktop\Test"

Enable the “Show hidden files, folders, and drives” option.

To delete a hidden file, you may need to enable the “Show hidden files, folders and drives” option in Folder Options window. To do this, navigate to the “View” tab and check off “Show hidden files, folders and drives.”

Check for Viruses

If none of the above methods work, it is possible that the file may have become infected with a virus. In such cases, you should scan your computer with an antivirus program to remove any viruses and then attempt deleting the file once more.

As the founder and owner of this website, I am an enthusiastic computer software and hardware enthusiast who takes pleasure in troubleshooting and solving computer-related problems. With MTech & BTech degrees in Computer Science & Engineering under my belt, I have worked in this field for over 12 years now. Through my career I have acquired a vast amount of knowledge regarding various computer topics such as software, hardware, and programming - knowledge which I love sharing with others to help people gain more insight into this exciting world of computers!