How do you delete a stubborn file?

What is a stubborn file?

A stubborn file is a file on your computer that refuses to be deleted through normal means. It could be a corrupted file, a file locked by another program, or a file that is simply resistant to deletion for unknown reasons. Stubborn files can be frustrating as they take up valuable hard drive space without providing any benefit.

Why are some files stubborn?

There are a few common reasons why a file may be stubborn and resist deletion:

  • The file is in use by another program – If a file is currently open or in use by another application, it cannot be deleted until the other program releases its lock on the file.
  • File permissions are restricted – The permissions on the file may prevent you from deleting it, especially if it is located in a protected system folder.
  • The file is corrupted – Corrupted files may not delete properly through normal means and require special handling.
  • It’s a system file – Some critical system files are protected against accidental deletion.
  • There’s a lock on the file – Third-party programs may place locks on files to prevent modification or deletion.

How can you tell if a file is stubborn?

Here are some signs that indicate you may be dealing with a stubborn file that resists deletion:

  • You get an error message when trying to delete the file through normal means.
  • The file reappears after being deleted.
  • You cannot rename, move or modify the file in any way.
  • The file’s size on disk does not reduce after deleting.
  • Antivirus software cannot scan or quarantine the file.

If you encounter any of these symptoms, you likely have a stubborn file on your hands that will require special techniques to remove.

How to force delete a stubborn file in Windows

Here are some methods to force delete stubborn files on Windows:

Use Task Manager to close associated programs

Sometimes a file cannot be deleted because it is currently in use by another running program. You can use Task Manager to identify and close any applications that may be locking the file:

  1. Press Ctrl + Shift + Esc to open Task Manager.
  2. Go to the “Processes” tab.
  3. Look for any processes associated with the stubborn file.
  4. Select the process and click “End task” to close it.
  5. Once the program is closed, try deleting the file again.

Change file permissions

If a file is locked due to restrictive permissions, you can take ownership of it and change the permissions:

  1. Right-click on the file and select “Properties”.
  2. Go to the “Security” tab and click “Advanced”.
  3. Click the “Owner” tab and change the owner to your username.
  4. Apply the changes, go back to the Security tab, and give yourself full control permissions.
  5. Click OK and attempt to delete the file again.

Unlock the file with Unlocker

Unlocker is a free utility that can force unlock files that are locked by other applications.

  1. Download and install Unlocker.
  2. Right-click on the stubborn file and select “Unlocker” from the context menu.
  3. Unlocker will determine what process has a lock on the file. Click “Unlock All” to release the locks.
  4. After unlocking, delete the file normally.

Delete on next reboot

If a file is locked while Windows is running, you can schedule it to be deleted on the next system restart:

  1. Press Windows + R to open the Run dialog.
  2. Type “cmd” to open Command Prompt.
  3. Enter the command: del /f /a [file path]
  4. This will force delete the file on next reboot. Restart your PC.

Delete from Safe Mode

Booting into Safe Mode loads a minimal version of Windows with only essential services. This prevents any third-party software from locking files.

  1. Access advanced startup options by holding Shift while clicking Restart.
  2. On the recovery screen, select “Safe Mode”.
  3. Log in and try deleting the stubborn file.
  4. If successful, reboot normally to exit Safe Mode.

How to force delete stubborn files on Mac

On a Mac, you can use these techniques to delete stubborn files:

Empty the Trash multiple times

  1. Drag the stubborn file to the Trash.
  2. Go to Finder > Empty Trash.
  3. Do this 2-3 times to force deletion of the file.

Use Trash It! utility

Trash It! is a free Mac app that can force-empty the Trash when normal deletion fails.

  1. Install and open Trash It!
  2. Drag-and-drop the stubborn file onto the Trash It! interface.
  3. Click “Empty Trash”. The file will be force-deleted.

Delete from Terminal

The Terminal provides access to powerful command line options for file deletion.

  1. Open Terminal app and enter “sudo rm -rf [file path]”
  2. Enter your password when prompted.
  3. The stubborn file will be force deleted.

Boot into Safe Mode

Like Windows, booting into Mac’s Safe Mode can allow deletion of stubborn files.

  1. Restart your Mac and hold Shift while it boots.
  2. Log into Safe Mode and find the file.
  3. Drag to Trash and empty Trash to force delete.

Third-party tools for deleting stubborn files

In addition to the above methods, there are some handy third-party tools specially designed to delete stubborn files:

  • IObit Undelete – Recovers deleted files and can delete stubborn ones resisting normal deletion.
  • FileAssassin – Designed to delete files that cannot be removed otherwise.
  • DeleteOnClick – Right click tool that provides advanced deletion functions.
  • Unlocker – Discussed earlier, it unlocks handles to allow file deletion.

These specialized tools may be able to target stubborn files that cannot be removed through system options alone.

Preventing stubborn files

While it’s difficult to avoid stubborn files completely, here are some tips to reduce their occurrence:

  • Close programs properly instead of force quitting to avoid corruption.
  • Eject external drives safely before disconnecting.
  • Install updates/patches to resolve software bugs causing stubborn files.
  • Use antivirus tools to scan for malware that prevents file deletion.
  • Delete files regularly instead of letting them accumulate.

Practicing good file management hygiene goes a long way towards avoiding stubborn file headaches down the line.

When to seek professional help

If you have attempted all the above solutions extensively and still cannot delete a file, it may be time to take it to a professional:

  • Computer repair technicians have access to advanced manual tools and software to remove stubborn files.
  • They can diagnose hardware issues if the disk itself is damaged or malfunctioning.
  • Professionals may be able to recover data from corrupted files before deletion.
  • If the file is related to the operating system, they can troubleshoot OS issues.
  • Technicians can completely erase disks and reinstall the OS if stubborn files are widespread.

Seeking professional assistance can resolve the most difficult cases of stubborn files.


Stubborn files that resist deletion can happen occasionally on any computer. Try the built-in methods like Task Manager, command line tools, and Safe Mode boot to force delete them. If the file persists, use specialized software like Unlocker, FileAssassin or IObit Undelete. For extreme cases, take your PC to a repair technician for resolution. Practicing good file management habits can help avoid stubborn files in the day-to-day. With the right tools and techniques, you can conquer the most persistent stubborn files.