Skip to main content
Available 24/7 for Emergency Support
Geeks in Sneaks
Can't delete a file because 'it's in use'
Windows ProblemsEasy5-10 minutes

Can't delete a file because 'it's in use'

Difficulty
Easy
Time
5-10 minutes
Category
Windows Problems

Getting the dreaded 'file is in use' error when trying to delete? Here's how to close the program that's holding onto it.

✓Quick Checks

Before diving into fixes, try these quick steps:

  • Close any programs that might be using the file (especially the program that created it)
  • Check your system tray for background apps that might have the file open
  • Wait 30 seconds and try again—sometimes background processes need a moment to release files
  • Restart your computer if you're in a hurry—this will close all programs and release all files

đź”§Step-by-Step Fixes

Fix 1: Close File Explorer and Reopen It

Sometimes File Explorer itself is the problem, especially if you were previewing the file.

  1. Right-click the taskbar and select Task Manager
  2. Find Windows Explorer in the list
  3. Click it, then click Restart at the bottom (your screen will flash briefly)
  4. Open File Explorer again and try deleting the file

Fix 2: Find Which Program Is Using the File

Resource Monitor can show you exactly which program has your file locked.

  1. Press Windows Key + R, type resmon, and press Enter
  2. Go to the CPU tab
  3. Click the little arrow next to Associated Handles to expand it
  4. In the search box, type part of your file name
  5. Look at the Image column to see which program is using it
  6. Close that program, or right-click it and select End Process
  7. Try deleting the file again

Fix 3: Use Task Manager to Close the Program

If you know which program is using the file but it won't close normally:

  1. Right-click the taskbar and select Task Manager
  2. Find the program in the list (click More details if you only see a simple list)
  3. Right-click the program and select End task
  4. If it doesn't close, click it and select End task at the bottom
  5. Wait 10 seconds, then try deleting the file

Fix 4: Delete on Restart Using Command Prompt

For stubborn files, you can schedule deletion for the next restart when no programs are running.

  1. Press Windows Key + X and select Terminal (Admin) or Command Prompt (Admin)
  2. Click Yes if User Account Control asks for permission
  3. Type this command (replace the path with your actual file path):
    del /F "C:\Users\YourName\Documents\locked-file.pdf"
  4. Press Enter and try again
  5. If that doesn't work, type:
    sfc /scannow
    This checks for system file issues that might be preventing deletion

Alternatively, you can use a free tool like Unlocker or LockHunter to identify and unlock files, but the built-in methods above work for most situations.

⚠️If Nothing Worked

If the file still won't delete:

  • Boot into Safe Mode: Restart your PC and press F8 during boot (or use Settings → Recovery → Advanced startup). In Safe Mode, only essential programs run, so your file should be unlocked.
  • Check file permissions: Right-click the file, select Properties → Security tab, and make sure your user account has Full Control.
  • Scan for malware: Sometimes malware locks files. Run Windows Security or your antivirus to scan the file.
  • Check cloud sync status: If the file is in OneDrive, Dropbox, or Google Drive, pause syncing temporarily and try again.

📞When to Call a Pro

If the file is a system file or located in Windows, Program Files, or other protected folders, deleting it could break your computer. If you're seeing 'Access Denied' even in Safe Mode, or if the file reappears after you delete it, you might have a malware infection that needs professional removal.

Also, if you're deleting files because a program won't uninstall properly, that's a separate issue that might need a tech to fix correctly.

Need Professional Help?

If you're in the Tampa Bay area and need hands-on assistance, Geeks in Sneaks provides friendly, on-site tech support in Clearwater, Clearwater Beach, and Dunedin.

Schedule a Visit

Related Topics

filespermissionstroubleshooting

Need Professional Help?

If you're still having trouble, our expert technicians can help.

Learn about our pc repair service