How do I delete unremovable files in Windows 10?

Dealing with unremovable files in Windows 10 can be a frustrating experience. These are files that refuse to be sent to the Recycle Bin when you attempt to delete them through normal means. Unremovable files might be critical system files, in use by other programs, corrupted, or infected by malware. Whatever the reason, you’ll need specialized tools and techniques to get rid of them.

What Causes Unremovable Files in Windows 10?

There are a few common culprits behind unremovable files in Windows 10:

  • System files: Windows relies on certain system files to function properly. Protected operating system files cannot be easily deleted.
  • In use files: Files currently opened or in use by other programs will likely be locked and unremovable.
  • Corrupted files: File corruption can prevent normal deletion. The file may be damaged or missing critical data.
  • Malware infection: Viruses, spyware, and ransomware will often lock infected files and make them unremovable by normal means.

Trying to force delete protected system files, in use files, or malware infected files can lead to further problems like crashes or data loss. The proper tools and techniques are required to safely remove these types of stubborn files.

How to Delete Unremovable Files in Windows 10

Here are the top methods to effectively delete those troublesome undeletable files in Windows 10:

Use Unlocker

Unlocker is a free utility designed specifically for deleting locked and unremovable files in Windows. It can unlock and delete files that are:

  • Locked by an open program
  • Locked by Windows (e.g. pagefile.sys)
  • Too long of a filename (over 256 characters)
  • Too deep in a folder structure (over 256 levels)

To use Unlocker:

  1. Download and install Unlocker from the official site at https://unlocker.en.softonic.com.
  2. Right-click on the unremovable file and select Unlocker from the context menu.
  3. Unlocker will determine the lock reason. Click Unlock All to unlock the file.
  4. Once unlocked, you can delete the file normally through File Explorer.

Delete at Next Reboot

If a file is locked because it is currently in use, you can schedule it to be deleted at the next system reboot. This releases the lock and deletion can proceed.

To delete at next reboot:

  1. Open Command Prompt as Administrator.
  2. Run the command DEL /F /A [filename]

    Replace [filename] with the path and name of the unremovable file.
  3. The file will be deleted after the next restart.

Kill Associated Processes

Files locked by a running program can be unlocked by ending the associated process:

  1. Open Task Manager (Ctrl+Shift+Esc)
  2. Go to the Processes tab
  3. Look for any process related to the file
  4. Select the process and click End Task
  5. This will terminate the process and release the file lock
  6. You can now delete the file normally

Be cautious before ending processes as it can cause instability if you force quit the wrong one.

Unlock with PendMoves

PendMoves is another handy utility for unlocking sticky locked files in Windows 10.

To use it to delete unremovable files:

  1. Get PendMoves from https://technet.microsoft.com/en-us/sysinternals/pendmoves.aspx.
  2. Right-click on the locked file and select Delete with PendMoves.
  3. PendMoves will schedule the file to be deleted on reboot.
  4. Restart your PC and the file will be removed.

Delete at Startup with RmMove

RmMove is similar to PendMoves in that it deletes unremovable files at startup rather than immediately. This gives it time to unlock the file.

To use RmMove:

  1. Download RmMove from https://www.microsoft.com/en-us/download/details.aspx?id=23510.
  2. Open Command Prompt as Administrator.
  3. Run the command rmmove /s [filename]

    Replace [filename] with the unremovable file.
  4. Restart your PC and the file will be deleted.

Erase with Secure Delete Tools

Secure delete utilities like Eraser and Secure Delete can delete unremovable files by overwriting the data before erasing. This prevents any chance of recovery.

To use Secure Delete on an unremovable file:

  1. Download and install Secure Delete – https://secure-delete.en.softonic.com.
  2. Right-click on the file and select Secure Delete.
  3. Choose a Secure Deletion Method like DoD 5220.22-M.
  4. Click Delete and the file will be securely erased.

Use this method carefully as secure deletion is permanent and the file can’t be recovered.

Delete from Safe Mode

Booting into Windows 10’s Safe Mode loads a minimal set of drivers and services. This can release file locks and enable deletion.

To delete an unremovable file from Safe Mode:

  1. Access Advanced Startup Options (Hold Shift and click Restart).
  2. Select Troubleshoot > Advanced Options > Startup Settings > Restart.
  3. After your PC restarts, choose Safe Mode on the Startup Settings screen.
  4. Log in to your user account.
  5. Navigate to the unremovable file and delete it.
  6. The minimal Safe Mode environment should allow deletion to succeed.

Delete from a Command Prompt

Deleting from an Administrator Command Prompt provides more control options that can force deletion on stuck files.

To delete unremovable files from Command Prompt:

  1. Open a Command Prompt as Administrator.
  2. Run the command DEL /F /S /Q /A [filename]
  3. Replace [filename] with the path and name of the unremovable file.
  4. The switches force deletion on even read-only and hidden files.

Be cautious with this method as you can potentially delete important system files.

Uninstall Associated Programs

If an unremovable file belongs to a program, application, or software package, fully uninstalling the parent program can eliminate associated files.

To uninstall a program with unremovable files:

  1. Open Settings > Apps > Apps & features.
  2. Locate the program that owns the file.
  3. Click Uninstall and fully remove the program.
  4. After uninstall completes, the program’s files should be removable.

This method works best for uninstalling malware and software with corrupted files preventing removal.

Use a Dedicated Undelete Tool

Sometimes unremovable files are caused by corruption in the file system itself. Dedicated undelete tools can help fix these kinds of issues.

A few top undelete tools include:

  • Recuva – https://www.ccleaner.com/recuva
  • TestDisk – https://www.cgsecurity.org/wiki/TestDisk
  • Puran File Recovery – https://www.puransoftware.com/File-Recovery

These tools dig deep into file system metadata and can repair issues that cause stubborn undeletable files in Windows 10.

Reset File Permissions

Incorrect file permissions can occasionally cause removal issues. Resetting permissions to take ownership can enable deletion.

To reset 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 user account.
  4. Apply the permission changes.
  5. Now try to delete the file again.

Reinstall Windows 10

If all else fails, performing a clean reinstallation of Windows 10 will certainly eliminate all traces of unremovable files. This should only be used as a last resort, as reinstalling Windows is a complex process.

  1. Backup important data first.
  2. Access the Windows 10 recovery environment.
  3. Choose to Keep Nothing and fully clean the drive.
  4. Proceed with a fresh install of Windows.

After the OS is reinstalled, your drive will contain only necessary Windows files and you can copy data back.

Conclusion

Unremovable files can certainly be a headache in Windows 10. Thankfully with the right tools and techniques, these stubborn files can usually be successfully deleted. First try simple solutions like Unlocker, deleting at reboot, and terminating processes. For more stubborn files, erase from Safe Mode, use Command Prompt, reset permissions, or uninstall the program. And when all else fails, a clean reinstall of Windows 10 will wipe the slate totally clean.

With a combination of patience and using the methods outlined above, you should be able to regain control and finally remove those pesky undeletable files clogging up your Windows 10 system.