TechBuzzPro

OneDrive Business File Locked Cannot Delete: Fix Guide

· 5 min read · Apps & Browsers

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

If you see a “file is locked” or “cannot delete” error in OneDrive for Business, the file is almost certainly open in another app, syncing, or checked out. Close the file everywhere, stop the sync briefly, and then delete it. The steps below walk through that in order, from the quickest fix to the more stubborn cases.

What You'll Need

  • Access to the OneDrive for Business account that owns the file (or an admin who can grant it).
  • The OneDrive sync app installed on the PC or Mac where the file is stored locally, if you use sync.
  • A browser signed in to the same Microsoft 365 work or school account for the web version.

Step-by-Step

  1. Identify where the file is open. On Windows, right-click the file and choose Open file location if you are in File Explorer. If the file is in a shared library, ask colleagues to close it. On a Mac, use the same right-click approach in Finder. A file that is open in Word, Excel, or PowerPoint can block deletion until the app releases it.
  2. Close the app that has the file open. Quit Word, Excel, PowerPoint, or any other program that might be using the file. On Windows, you can also open Task Manager (Ctrl+Shift+Esc), find the app, and end the task. On Mac, use Force Quit (Command+Option+Esc). Reopen the app only after the deletion is done.
  3. Pause OneDrive sync. In the OneDrive cloud icon in the notification area (Windows) or menu bar (Mac), select Pause syncing and choose a short duration such as 2 hours. This stops the sync engine from holding the file while you work.
  4. Delete the file from the local OneDrive folder. In File Explorer or Finder, right-click the file and choose Delete. If Windows says the file is in use, repeat step 1 and check for hidden preview panes or search indexers. On Windows, you can also try Shift+Delete to bypass the Recycle Bin, but only if you are sure you want it gone permanently.
  5. Delete from OneDrive on the web. Sign in at onedrive.com with your work account, navigate to the file, right-click it, and choose Delete. The web version often succeeds when the local sync is stuck. If the file is in a shared folder, you may need the owner to delete it or grant you edit rights.
  6. Resume syncing and check the Recycle Bin. Unpause OneDrive. Open the Recycle Bin in the OneDrive web interface to confirm the file is there. If you need it back, you can restore it; if not, it will be cleaned up automatically after the retention period set by your organization.
  7. If the file is checked out, check it in. In SharePoint or OneDrive, a checked-out file can block deletion. Open the file’s details pane or the library’s Manage files view, and use Check in or Discard checkout if you have permission. After that, delete the file again.

Common Mistakes

  • Deleting only the local copy. If you delete the file from your PC while sync is paused, OneDrive may re-download it when sync resumes. Always delete from the web or confirm the deletion propagated.
  • Ignoring shared links. A file shared with “Anyone with the link” can be opened by others, which may keep it locked. Remove sharing or ask recipients to close it.
  • Forcing deletion while a sync is in progress. This can leave the file in a “pending” state. Pause sync first, then delete.
  • Assuming you have permission. In a business account, you may only have “Read” or “Edit” rights. Only the owner or an admin can delete some files. Check the file’s permissions in the details pane.

Tips

  • Use the OneDrive web interface to delete files when the desktop app misbehaves; it is often more reliable for locked files.
  • If you use a Mac, check that the file is not open in Preview or Quick Look; those can hold a lock.
  • For files in a SharePoint document library, you may need to use the library’s Open in Explorer or Open in Finder option, then delete from there.
  • Keep the OneDrive app updated; older versions can have sync bugs that cause locks.

Troubleshooting

If the file still won’t delete, work through these in order:

  1. Sign out and back in. In the OneDrive app settings, sign out of your account, restart the computer, and sign in again. This clears stale sync sessions.
  2. Reset OneDrive. On Windows, press Win+R, type %localappdata%\Microsoft\OneDrive\onedrive.exe /reset and press Enter. The cloud icon will disappear and reappear. On Mac, quit OneDrive, move the app to the Trash, and reinstall from the official Microsoft download page. Note: resetting does not delete your files, but it may re-sync them.
  3. Check for file holds or retention policies. In Microsoft 365, a retention label or eDiscovery hold can prevent deletion. Ask your IT admin to check compliance settings for the file.
  4. Use the SharePoint admin center. If the file is in a SharePoint library, an admin can delete it from the library settings or using PowerShell. Only admins should attempt this.
  5. Contact support. If none of the above works, open a support ticket with Microsoft 365. Provide the file path and the exact error message.

Frequently Asked Questions

Why does OneDrive say the file is locked?

It usually means another program has the file open, the file is being synced, or it is checked out in SharePoint. Closing the program or pausing sync often resolves it.

Can I delete a file that someone else shared with me?

Only if you have edit or delete permissions. Otherwise, ask the owner to delete it or remove your access.

What happens if I delete a file from OneDrive for Business?

It goes to the site’s Recycle Bin for a period set by your admin (often 93 days). After that, it is permanently removed.

Does pausing sync delete my files?

No. Pausing sync only stops updates between your PC and the cloud; your local files remain.

Why can’t I delete a file even after closing all apps?

The file may be checked out, subject to a retention policy, or locked by the sync engine. Try deleting from the web or resetting OneDrive.

Is it safe to reset OneDrive?

Yes, resetting the sync app does not delete your cloud files, but it will re-sync them. Make sure you have a backup of any local-only files.