Why are some files Undeletable?

Some files may seem impossible to delete. When attempting to send a file to the Recycle Bin, you may get an error saying “File Access Denied” or “File in Use”. This often occurs with system files that Windows requires to run properly. While frustrating, there are ways to force delete undeletable files.

What types of files are undeletable?

The most common undeletable files fall into these categories:

  • System files – Files required by Windows like dll, exe, sys, etc.
  • Files in use – Open files being accessed by a program.
  • ReadOnly files – Files marked as read-only.
  • Hidden files – Files marked as hidden.
  • Locked files – Files locked by the OS or a program.
  • Corrupted files – Files damaged or corrupted.

Trying to delete these types of files normally results in errors like:

  • “File Access Denied”
  • “File in Use”
  • “Access Denied”
  • “Sharing Violation”
  • “File in Use by Another Process”

Why are system files undeletable?

System files like DLLs, EXEs, drivers, etc. are protected by Windows and cannot be easily deleted. This prevents accidental deletion or modification of critical operating system files.

For example, trying to delete a system DLL like kernel32.dll will give an “Access Denied” error. Windows blocks deletion to prevent possible crashes or instability.

Why are in use files undeletable?

Files opened by a running program are locked and cannot be deleted. This prevents errors or data corruption from deleting a file while it’s being accessed.

For example, trying to delete a Word doc that is currently open in Word will give a “File in Use” error. Windows blocks deletion until Word releases the lock on that file.

Why are read-only files undeletable?

Files marked read-only (the read-only attribute) cannot be deleted. The read-only attribute is applied manually or by programs to protect files from modification.

Trying to delete read-only files results in “Access Denied” errors. You must remove the read-only attribute first before deletion.

Why are hidden files undeletable?

Hidden files don’t appear in Windows Explorer by default. Since they’re hidden from view, they may also be undeletable.

Trying to delete a hidden file from Command Prompt gives “Access Denied” errors. You must unhide the file first before you can delete it.

Why are locked files undeletable?

The Windows Lock feature prevents modification of files. Locking a file will make it undeletable until you unlock it.

File locking is also used by programs to prevent deleting or changing a file while it’s in use. These locks must be released before deleting the file.

Why are corrupted files undeletable?

File corruption can make a file seem undeletable. Corrupted files may not completely delete, or the deletion process itself can crash.

Resetting folder view options can temporarily fix corrupted file errors. But damaged files may need to be repaired before successful deletion.

How to delete undeletable files in Windows

While protected by Windows, there are ways to force delete undeletable files:

  • Close programs using the file – Shut down any programs with the file open.
  • Unlock the file – Remove any locks applied to the file.
  • Unhide the file – Unhide any hidden files before deleting.
  • Remove read-only status – Use Properties > General > Read-only to remove.
  • Use Command Prompt – Run CMD as admin and use DEL or ERASE commands.
  • Delete on reboot – Use a program like Unlocker to delete after reboot.

Close programs using the file

Files open in a program are locked as “in use” and undeletable. Check Task Manager for any process using the file.

Close the program entirely to release the lock so Windows can delete the file.

Unlock the file

Locked files require explicitly unlocking before they can be deleted. Right-click the file > Properties > General > Advanced.

Click Unlock under the Attributes section. This removes locks put in place by Windows or third-party software.

Unhide the file

Hidden files must be unhidden first before Windows lets you delete them.

Open Command Prompt as admin and run:
attrib -h -r -s /s /d X:\*.*

Replace X with the drive letter. This unhides and unlocks all hidden files on the drive.

Remove read-only status

Read-only files have to be set as writable before they can be deleted. Right-click the file > Properties > General > Read-only.

Uncheck the Read-only box to remove this restriction. Then you should be able to delete the file.

Use Command Prompt

Running CMD as admin gives you more delete power than Windows Explorer.

Use the DEL or ERASE command on the file name. This often forces deletion of stuck files.

Make sure to run CMD as admin by right-clicking and Run as administrator.

Delete on reboot

Programs like Unlocker add a reboot option to force delete locked files after restarting Windows.

This lets Windows remove in use, system, or stubborn files that won’t delete normally even from Command Prompt.

Best tools to delete undeletable files

Specialized software can force delete files Windows refuses to remove. Some top undeletable file deletion tools include:

Tool Details
Unlocker Adds right-click delete option for access denied files, plus delete after reboot for in use files.
FileAssassin Portable app that force deletes stubborn files and folders.
Delete Doctor Safely delete protected system files and corrupted files.
Puran File Wiper Securely overwrite delete files to prevent recovery.


Unlocker is one of the best tools for deleting stuck files in Windows. It adds right-click context menu options for unlocking and force deleting access denied files and folders.

For files in use, Unlocker lets you schedule deletion after a reboot. This is key for removing locked system files.


FileAssassin is a portable tool specialized for deleting protected files like in use, locked, read-only, hidden system files, etc. It has batch delete options and advanced force delete functions.

Delete Doctor

Delete Doctor removes read-only files, in use files, folder access denied errors, corrupted files, and other undeletables. It has extra delete power for removing stubborn files.

Puran File Wiper

Along with deleting stuck files, Puran File Wiper uses advanced techniques like shredding to permanently erase files. This prevents any chance of recovery of deleted files.

Tips for preventing undeletable files

While undeletable files can’t always be avoided, here are some tips to reduce occurrences:

  • Don’t use software that applies heavy file locking
  • Close programs before deleting associated files
  • Delete files from bootable media if the main OS won’t permit it
  • Don’t modify permissions of system files
  • Prevent file corruption with disk checkups
  • Use backup software that deletes old versions cleanly

Avoid excessive file locking

Some third-party apps excessively lock files to prevent modification. But this makes even manual deletion impossible.

When possible, avoid software that applies heavy immutable file permissions.

Close programs first

Many undeletable file errors can be avoided by making sure a file is not currently running in an open application.

Checking Task Manager for processes using the file and closing them first clears most “file in use” errors.

Delete from bootable media

Booting from an external drive lets you delete protected system files that the main OS blocks deletion of.

Tools like Unlocker add a reboot to delete option, but external media gives more control.

Don’t modify system files

Avoid manually changing permissions on critical operating system files. This can lead to undeletable file errors later on.

Modifying properties like read-only on system files also risks instability.

Prevent file corruption

Corrupted files can seem permanently stuck and undeletable. Regular error checking helps prevent file system corruption.

Also be careful improperly shutting down Windows or disconnecting drives which can cause file damage.

Clean deletes with backup software

Some backup tools like Time Machine don’t properly delete older versions of files. This piles up undeletable shadow copies.

Choose backup tools that completely remove old file versions without leaving remnants.


Windows aims to prevent accidental file deletion by blocking deletion of protected system files or files currently in use. But this can leave some files seeming permanently undeletable. Using the right tools and techniques, these stubborn files can be force deleted. Avoiding unnecessary file locks and corruption also reduces the chances of encountering undeletable files.