Files Won't Delete on Windows 11? 4 Ways to Force Erase Them

You can force delete files using certain commands in the CMD

Reading time icon 4 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

Key notes

  • Having difficulties with deleting files on Windows 11 makes it impossible to remove unwanted files or free up memory space.
  • The problem can occur due to file permission issues and read-only file attributes.
  • Restart File Explorer, check file permissions and use the Command Prompt to force delete the file.
files won't delete windows 11

Many Windows 11 users have complained about being unable to delete from their PCs for some reason. It can be annoying, preventing users from freeing memory or removing unwanted files. However, we’ll discuss why files won’t be deleted on Windows 11 and how to fix it.

Also, you may be interested in our article about what to do if File Explorer deleted files are still showing on your computer.

Why is my PC not letting me delete files?

  • It can occur if you’re not the file owner or your user account doesn’t have appropriate access rights.
  • The file might be used by another program or process, preventing it from being deleted.
  • The operating system or a third-party program may lock the file or folder.
  • If your computer’s file system is corrupted, it can cause issues with file deletion.
  • The file or folder may enable the read-only attribute, restricting modifications and deletions.
  • Windows protects some system files and folders to prevent accidental deletion, causing the restriction.
  • If the file name exceeds the maximum allowed path length, you may have trouble deleting it.
  • Antivirus or security software can interfere with file deletion if it has strict access controls.

What can I do if files won’t delete on Windows 11?

Before proceeding with any advanced troubleshooting steps, we recommend you observe the following preliminary checks:

  • Restart your computer to resolve temporary issues affecting the file deletion.
  • Turn off background processes using the file and prevent it from being deleted.

1. Close and restart File Explorer

  1. Right-click the Windows button and click on Task Manager from the list menu.
  2. Navigate to the Processes tab. Find Windows Explorer, right-click on it, and select End Task from the drop-down menu.
  3. Click on Run new task.
  4. Type explorer.exe and press Enter to restart File Explorer.
  5. Attempt to delete the files again and check if the issue persists.

Restarting File Explorer will resolve any locks or malfunctions causing it to be unable to delete files.

2. Get complete control over the file

  1. Right-click the file you want to delete and select Properties from the drop-down menu.
  2. Go to the Security tab and ensure your user account has the necessary permissions to delete the file.
  3. If not, click on Edit to adjust the permissions.
  4. In the new window, give your account full control.

The above steps will help assign enough rights to alter the file if you don’t have the necessary permissions to delete the files.

Check our guide about ways to reset permissions on Windows 11 if you can’t get around the steps above.

3. Use Command Prompt to force delete the file

  1. Locate the file path of the file in File Explorer and copy it.
  2. Left-click the Start button, type Command Prompt, and click the Run as administrator option.
  3. Click Yes on the User Account Control (UAC) prompt.
  4. Navigate to the file location using the following command and path: e.g., cd C:\Path\to\file
  5. Once in the correct directory, type the following and press Enter: del /f filename.extension
  6. Replace filename.extension with the actual name of the file you want to delete.

The /f flag forces deletion without prompting for confirmation. It runs the file deletion process without any permission or security access.

4. Delete files in Safe Mode

  1. Press the Win key + R to open the Run Command window. Type cmd and press enter to open Command Prompt.
  2. Type the following in the Command Prompt and press Enter: bcedit / set {current} safeboot minimal
  3. Wait for your PC to restart and show the Safe Mode.
  4. Once in Safe Mode, navigate to the file location and try deleting it.

Safe Mode starts Windows with minimal drivers and processes, which can help bypass any issues preventing file deletion.

You can read our guide on what to do if Safe Mode is not working on Windows 11.

In conclusion, you can check our article about how to fix File Explorer freezing or not responding on Windows 11.

Feel free to leave your questions and suggestions in the comments section below.

More about the topics: File Explorer, files