How to Force Delete a File in Windows 11

To force delete a file in Windows 11, close the app that has it open, end that app in Task Manager if it won’t close, and delete the file again. If Windows still refuses, restart the PC, delete the file in Safe Mode, run del /f in Command Prompt for a read-only file, or take ownership of the file when you see “Access is denied.”

These steps use only tools built into Windows 11 and work the same way in Windows 10, where a few File Explorer menus look different. They are for your own unwanted files, not for apps or Windows files.

Before You Force Delete a File

Read these warnings first, because a forced delete is hard to undo.

  • Never delete system files. Leave anything in C:\Windows, C:\Program Files and C:\Program Files (x86) alone, and don’t take ownership of files Windows protects. Removing them can stop apps or Windows from starting. To remove a program, uninstall it in Settings > Apps > Installed apps instead.
  • The command line skips the Recycle Bin. Files removed with del or rd, or with Shift + Delete, don’t go to the Recycle Bin. Copy the file somewhere safe first if there is any chance you need it.
  • Check that you have the right file. In File Explorer, select View > Show > File name extensions, as described in Microsoft’s File Explorer guide. A document, a shortcut and a program can share the same visible name. For more detail on the setting, read how to show file extensions.
  • Watch for OneDrive. Deleting a file in a OneDrive folder can also remove it from the cloud and your other devices. Read Microsoft’s OneDrive deletion guidance first.

Match the Error to the Fix

The message Windows shows usually points to the right method.

What Windows says Usual cause Start with
The action can’t be completed because the file is open in (app name) That app has the file open Method 1 or 2
File in use, with no app named A background process or the Explorer preview Method 2, then 3
You’ll need to provide administrator permission to delete this file The file needs admin rights Select Continue with an admin account, or Method 5
Access is denied, or you need permission from another user Another account owns the file Method 6
Could not find this item A bad name, a very long path or a drive error Method 5 and the troubleshooting section

Method 1: Close the App Using the File

  1. Save your work in the app that has the file open, then close the app. Its window disappears from the taskbar.
  2. Close music and video players, photo viewers and editors that might still show the file.
  3. In File Explorer, select View > Show and turn off Preview pane if it is on. The preview can keep a file open.
  4. Right-click the file and select Delete (the trash can icon). The file moves to the Recycle Bin.
Steps to close the app using the file: save and close the document, close players, editors, and previews, retry Delete, restart Windows if it is still locked
Illustration: how to close the app using the file.

Method 2: End the App in Task Manager

Use this when an app is frozen or keeps running in the background. Ending a task closes it without saving, so save first if you can.

  1. Press Ctrl + Shift + Esc. Task Manager opens on the Processes page. Task Manager also opens in other ways in Windows 11.
  2. Select the app that used the file, such as Word or a media player, and select End task. The app disappears from the list.
  3. If no app is listed, scroll to Windows Explorer, select it and select Restart task (or right-click it and choose Restart). The taskbar and open folders vanish for a moment and come back.
  4. Try deleting the file again.

Find the Hidden Process With Resource Monitor

When you can’t tell which program holds the file, Resource Monitor can show it.

  1. Select Start, type resmon and press Enter. Resource Monitor opens.
  2. Open the CPU tab and expand Associated Handles.
  3. Type the file’s name in the search box in that section. The process using the file appears in the list.
  4. Close that program normally. If you can’t, end it in Task Manager. Don’t end processes you don’t recognize, because some belong to Windows.

Method 3: Restart the PC

  1. Save your work and select Start > Power > Restart. Use Restart rather than Shut down, because a full restart closes every app and background process.
  2. After you sign in, delete the file before you open any other apps.

Method 4: Delete the File in Safe Mode

Safe Mode starts Windows with a minimal set of drivers and without most startup apps, so fewer programs can hold the file. If your drive uses BitLocker, have your recovery key ready, as Microsoft notes in its startup settings guide.

  1. Save your work. Open Settings > System > Recovery, and next to Advanced startup select Restart now. You can also hold Shift while you select Start > Power > Restart.
  2. On the blue screen, select Troubleshoot > Advanced options > Startup Settings > Restart.
  3. When the list of options appears, press 4 or F4. Windows starts in Safe Mode with black corners labeled “Safe Mode.”
  4. Sign in, delete the file in File Explorer, then restart normally from Start > Power > Restart.

Method 5: Delete a Read-Only or Stubborn File in Command Prompt

The del command can remove a read-only file that File Explorer won’t delete. Remember that it skips the Recycle Bin.

  1. In File Explorer, right-click the file and select Copy as path. The complete path, with quotation marks, is copied.
  2. Select Start, type cmd and select Command Prompt. If the file needs admin rights, select Run as administrator and choose Yes. Here is how to run Command Prompt as admin in Windows 11.
  3. Type del /f /p, then press Ctrl + V to paste the path. The line should look like del /f /p "C:\Users\Name\Downloads\report.pdf".
  4. Press Enter. Windows shows the file name and asks Delete (Y/N)?
  5. Check the name. Type Y and press Enter to delete it, or N to cancel.
  6. Go back to File Explorer and confirm the file is gone.

In Microsoft’s del command reference, /f forces deletion of read-only files and /p asks you to confirm each file. Never add wildcards such as *, and never point del at a folder, because it deletes every file inside that folder.

If the window says PowerShell at the top, type cmd and press Enter first. The /f and /p switches only work in Command Prompt.

If del says it could not find a file you can see, the file may be marked hidden or system. Run attrib -r -h -s followed by the pasted path, then run the del line again.

If It Is a Folder

The rd command removes folders. rd /s "folder path" deletes the folder and everything in it after you confirm, as Microsoft’s rmdir reference explains. Avoid /q, which removes the confirmation. The Windows 11 folder-deletion guide covers the checks to make first.

Method 6: Take Ownership When Access Is Denied

Use this only for your own files, such as files copied from an old PC or another user account. Don’t do this for Windows files, or for a work or school file. Ask the owner or your IT administrator instead. You need an administrator account.

  1. Right-click the file, select Properties and open the Security tab.
  2. Select Advanced. Next to Owner, select Change.
  3. Type your account name, select Check Names and select OK. Then select Apply and OK, and close the Properties window.
  4. Open Properties > Security again and select Edit. Select your account (use Add if it isn’t listed), check Allow next to Full control and select OK.
  5. Delete the file in File Explorer.

The command-line version is takeown /f "file path" in an admin Command Prompt. Microsoft’s takeown reference notes that you may still need to grant yourself permissions in File Explorer, as in step 4.

If the File Still Won’t Delete

  • Access is denied even as an administrator: the file probably belongs to Windows (often listed as owned by TrustedInstaller). Leave it in place.
  • The path is not found or is too long: check the quotation marks, the file extension and that an external drive is still connected. For a very long path, rename the parent folders to shorter names, then try again.
  • The file comes back: a sync service or app is recreating it. Pause OneDrive syncing or close the app, then delete the file.
  • Your antivirus is scanning it: wait for the scan to finish and try again. Don’t turn off Windows Security to delete a file.
  • The drive may have errors: in File Explorer, open This PC, right-click the drive, select Properties > Tools > Check, and let Windows scan it.
  • You deleted the wrong file: for backup and recovery options, read about finding deleted files on Windows 11.

Frequently Asked Questions

Does force deleting skip the Recycle Bin?

Yes. The del and rd commands and Shift + Delete remove files permanently. Deleting from File Explorer after closing the app or in Safe Mode still sends the file to the Recycle Bin.

Is it safe to force delete a file?

It is safe for your own files, such as old downloads or documents, once you have checked the name and location. It is not safe for files in Windows or Program Files folders.

Can I recover a force-deleted file?

Sometimes, from a backup such as File History or the OneDrive recycle bin. Stop saving new files to that drive and try recovery as soon as possible. Recovery is never guaranteed.

Do I need a third-party unlocker app?

No. Task Manager, Resource Monitor, Safe Mode and Command Prompt handle almost every locked file without installing anything.

Why does Windows say I need permission when it’s my own PC?

The file may belong to another account, or it may need admin rights. Select Continue if you use an admin account, or follow Method 6 for a file you own.