EaseUS Partition Master

How to Force Delete a File That Cannot Be Deleted on Windows

You can learn how to force delete a file if you can't delete file or fail to delete files on Windows 11, 10, 8, and 7. It is most likely because another program is currently trying to use the file or the file is locked. Here are methods that work to fix how to delete files that cannot be deleted.

Free Download 

Windows 11/10/8/7100% Secure

EaseUS Partition Master partition management conception image
EaseUS Partition Master interface showing logo, as illustrated in the support guide.

Content

Page Table of Contents

Sherly

Updated by

Sherly
Brithny

Written by

Brithny

Updated on Nov 25, 2026

Trying to delete a file on Windows 11/10 but keep getting an error? You may see messages like "File in Use," "Access Denied," or "You need permission to perform this action." Sometimes, even restarting your computer doesn't help.

A file may become undeletable because another program is using it, your account lacks the required permissions, or the file has a read-only attribute. File system errors and invalid file paths can also prevent normal deletion.

Fortunately, there are several ways to force delete a file on Windows 11/10. In this guide, we'll show you 6 practical methods, including using Task Manager, Command Prompt, changing file permissions, and Safe Mode. Choose the method that matches your deletion error and follow the steps below.

Why Can't Delete File/Folder on Windows 11/10/8/7

Sometimes you might encounter a folder that you're unable to delete. If you want to fix this problem, you must know the reason first. Generally, the file being used or locked is the main reason. Otherwise, a virus must be taken into account.

Error Message or Situation

Possible Cause

Recommended Solution

File is open in another program

Another application or background process is using the file

Close the program or end the related process

Access Denied

Insufficient permissions or file ownership restrictions

Change file permissions

You need administrator permission

Your current account lacks the required privileges

Run the deletion tool as an administrator

The file is read-only

The read-only attribute prevents normal deletion

Remove the read-only attribute

Cannot find this item

The file path or filename may be invalid

Check the file path and filename

File still won't delete

File system errors or other restrictions may be involved

Check the drive and try Safe Mode

It's most likely because another program is currently trying to use the file. This can occur even if you don't see any programs running. When a file is open by another app or process, Windows 11/10 puts the file into a locked state, and you can't delete, modify, or move it to another location. Usually, after the file is no longer in use, the application will unlock it automatically, but that's not always the case. Sometimes, a file may not unlock successfully, and even if you try to take any action, you'll see a warning that the operation can't be completed because it's open by another program.

Before you take actions to delete the undeletable files, you can first try these simple tips and delete these files:

  • Close all the programs.
  • Restart your computer.
  • Let the antivirus scan your computer to see if there's a virus on your computer and get rid of it.

If these files still exist, the following methods may help. Do not forget to share this post to help more users who are stuck with the same errors.

How to Force Delete Files That Can't Be Deleted

If you're unsure what is preventing deletion, start with the simplest solutions, such as closing open programs or restarting your computer. Then move on to the advanced methods below.

Method 1. Force Delete File Using a Third-Party Tool

There are many third-party applications that can help you with this problem and delete locked files. One tool that might help you with this problem is EaseUS BitWiper. It can help clean up junk files and wipe all data. It's fully compatible with Windows 11/10/8/7, etc.

Free Download 

Windows 11/10/8/7100% Secure

Free download this software and start deleting undeletable files now.

Step 1. Launch EaseUS BitWiper and click "File Shredder".

Permanently Delete Files from Computer Without Recovery

Step 2. Click "Add Files" to select the files you need to shred, or you can drag files, documents, images, music files, etc., into the center area.

Select files to shred

Step 3. Re-select files that you need to shred and click "Shred" to confirm.

Confirm to shred files

Step 4. The program will immediately shred all the selected files. When it finishes, click "Done".

Complete shredding files

It's important to note that unlocking and deleting files on Windows 11/10 may cause system and program issues, depending on the type of files you're trying to unlock. So be careful of what you delete if you're not sure of the consequences. This tool can also force delete large files on Windows 10/11.

Method 2. How to Delete Files that Cannot be Deleted from Task Manager

Usually, can't delete file because it is open in system. You could receive the information when you can't delete a file, like this screenshot, files cannot be deleted if the file is open in an application.

force to delete a file - 1

To force Windows 11/10 to delete a file, you can follow the steps below:

Step 1. Go to Start, type Task Manager, and choose "Task Manager" to open it.

Step 2. Find the application that is currently using the file, and select "End task".

Step 3. Then, try to delete the file again on your Windows PC.

force to delete a file -2

Method 3. Delete File that Cannot be Deleted with Command Prompt

How to delete a file that won't delete? Using Command Prompt for deletion is sometimes more efficient, and you definitely should give it a try. Here's what you need to do to delete a certain file or folder with Command Prompt:

Step 1. Press the Windows key + R and type cmd to open the Command Prompt or just search for Command Prompt at the start. Click the "Run as administrator".

open command prompt

Step 2. In the Command Prompt, enter del and the location of the folder or file you want to delete, and press "Enter" (for example, del c:\users\JohnDoe\Desktop\text.txt).

Read Also: Diskpart Force Delete Partition

Method 4. Enter Safe Mode to Fix "File Won't Delete"

Usually, when you come across a locked file, you can simply restart your device to unlock it. If it doesn't work, you can boot into Safe Mode to unlock and delete the file. 

Step 1. Open "Settings" > Click on "Update & Security" > Click on "Recovery" > Under "Advanced Startup", click the "Restart now" button.

Step 2. Click on "Troubleshoot" > "Advanced options" > "Startup Settings".

Step 3. Click the "Restart" button.

Step 4. On "Startup Settings," press F4 to enable Safe Mode.

click trouble shoot and choose the following settings

While in Safe Mode, use File Explorer to locate and delete the files that were previously locked, then simply restart your device as you would normally to exit Safe Mode.

Tip
Before we delete the undeletable files by wiping the whole partition, you must backup other useful files in advance. Once you start the erasing process, you can't be canceled it until it is finished. Do remember to check the folders again to avoid data loss.

Method 5. Remove Read-Only Attributes and Delete the File

A read-only attribute can prevent Windows from modifying or deleting certain files through normal methods. If the file is marked as read-only, you can remove this attribute using the Command Prompt.

Step 1. Open Command Prompt as an administrator.

Step 2. Enter the following command: attrib -r "C:\Path\To\File.txt"

Replace the file path with the actual location of your target file.

Step 3. Press Enter to remove the read-only attribute.

Step 4. Run the following command to delete the file: del /f /q "C:\Path\To\File.txt"

Windows should now be able to remove the file if no other restrictions are preventing deletion.

Note: The -r parameter removes the read-only attribute. Removing this attribute does not bypass file locks or access restrictions.

Method 6. Change File Permissions to Force Delete It

Sometimes, Windows prevents you from deleting a file because your account doesn't have sufficient permissions or ownership. In this case, changing the file permissions may help resolve the "Access Denied" error.

Follow these steps to take ownership of the file:

Step 1. Right-click the target file and select Properties.

Step 2. Go to the Security tab and click Advanced.

Step 3. Find the Owner section and click Change.

Step 4. Enter your Windows account name, click Check Names, and then click OK.

Step 5. Apply the changes and close the Properties window.

Step 6. Return to the file, open Properties > Security, and check whether your account has the required permissions to delete it. Adjust the permissions if necessary.

Once you have the appropriate ownership and permissions, try deleting the file again.

Note: Changing file ownership and permissions can affect access to files and folders. Only modify permissions for files you recognize. Avoid changing ownership of protected Windows system files.

Video Guide - Fix Can't Delete File or Folder on Windows 11

Can't delete file because it is open in system? This tutorial released by Britec09 shows you how to force delete files and folders using Command Prompt, PowerShell, and UnlockIt. See how to delete a file that is open in system.

  • Use CMD - 00:23
  • Run EaseUS Partition Master- 01:30
  • Shift + Delete Keys - 02:13

If you think the provided solution works for forcing file deletion on Windows, you can share it with more friends to help them solve the problem!

Bonus Tips - How to Recover Deleted Files or Folders

There are times you mistakenly delete a needed file on your Windows 11, 10, 8.1, 8, or 7 computers; we also provide you with additional help. You can recover deleted files with easy-to-use data recovery software. EaseUS Data Recovery Wizard is my recommendation. It is the best file recovery software that allows you to:

  • Restore data from internal and external hard drives, SSDs, USB flash drives, SD cards, etc.
  • Retrieve lost videos, photos, Word files, music, and more.
  • Repair corrupt/damaged photos and repair MP4 files.
  • Download and install EaseUS Data Recovery Wizard on your computer and follow the steps below to recover deleted files.

Step 1. Select the location to scan

Choose the specific device and drive where you have permanently deleted files using Shift delete or emptying recycle bin. Then, click the "Search for Lost Data" button to find lost files.

select a location and click scan

Step 2. Check the results

The software will automatically start scanning all over the selected drive. When the scan completes, select the deleted or lost folders in the left panel using the "Path" feature. Then, apply the "Filter" feature or use the search box to quickly find the deleted files.

scan permanently deleted files

Step 3. Recover deleted files

Select the deleted files and click "Preview". Next, click "Recover" to save them to another secure location or device. You can choose a cloud storage, such as OneDrive, Google Drive, etc., and click "Save" to save your recovered files.

select files and click recover

FAQs About Force Deleting Files on Windows

1. How do I force delete a file that won’t delete on Windows 11?

You can use Command Prompt to force delete a file on Windows 11. Open CMD as an administrator and run del /f /q "FilePath", replacing FilePath with the actual file location. This command can force the deletion of read-only files but cannot unlock files currently used by another process.

2. How do I force delete a file without administrator permission?

You generally need sufficient permissions to delete a protected file. If you receive an Access Denied error, check the file’s ownership and permissions. If the file is protected by Windows or another account, you may need an administrator account to change its permissions.

3. How do I delete a file that is open in another program?

Close the application using the file and try deleting it again. If you cannot identify the application, open Task Manager and check for related processes. Restarting your computer or using Safe Mode may also help release file locks.

4. How do I force delete a folder that cannot be deleted?

Open Command Prompt as an administrator and run rmdir /s /q "FolderPath". Replace FolderPath with the actual folder location. This command deletes the specified folder and all its contents, so check the path carefully before executing it.

5. Why does Windows keep saying I cannot delete a file?

Windows may prevent file deletion because the file is open in another program, your account lacks sufficient permissions, or the file has a read-only attribute. Other causes include invalid file paths, file system errors, and system restrictions. Identify the specific error before choosing a deletion method.

Conclusion

When you can't delete a file on Windows 11/10, the problem is often caused by a file lock, insufficient permissions, or a read-only attribute. You can try closing the program using the file, ending the related process in Task Manager, using Command Prompt, changing file permissions, or deleting the file in Safe Mode.

The best way to force delete a file depends on the error you're facing. Before using commands such as del or rmdir, double-check the file path and make sure you don't need the selected data. If a file still cannot be deleted, check whether it is protected by Windows or affected by file system errors rather than attempting to remove it blindly.

How Can We Help You

About the Author

Sherly

Updated by Sherly

Sherly joined EaseUS in 2022 and she has always loved writing articles and enjoys the fun they bring. She receives professional training here, focusing on product performance and other relative knowledge. She has written over 200 articles to help people overcome computing issues.

Read full bio

Brithny

Written by Brithny

Brithny is a technology enthusiast, aiming to make readers' tech lives easy and enjoyable. She loves exploring new technologies and writing technical how-to tips. In her spare time, she loves sharing things about her game experience on Facebook or Twitter.

Read full bio

Product Reviews

Product Reviews

TrustScore 4.7 | 49 reviews
  • I love that the changes you make with EaseUS Partition Master Free aren't immediately applied to the disks. It makes it way easier to play out what will happen after you've made all the changes. I also think the overall look and feel of EaseUS Partition Master Free makes whatever you're doing with your computer's partitions easy.

    Read More
  • Partition Master Free can Resize, Move, Merge, Migrate, and Copy disks or partitions; convert to local, change label, defragment, check and explore partition; and much more. A premium upgrade adds free tech support and the ability to resize dynamic volumes.

    Read More
  • It won't hot image your drives or align them, but since it's coupled with a partition manager, it allows you do perform many tasks at once, instead of just cloning drives. You can move partitions around, resize them, defragment, and more, along with the other tools you'd expect from a cloning tool.

    Read More

Get EaseUS Partition Master

Your best companion for disk partitioning, MBR to GPT/GPT to MBR conversion,even OS migration

Free Download 

Windows 11/10/8/7100% Secure