logo
search
OneDrive File Issues

How to Fix Cannot Delete a OneDrive File Still in Session

Rana GarciaRana Garcia Oct 10, 2026 869 views

Question details

The user is unable to rename or delete a file in OneDrive because the system indicates the file is currently open or still in an active session.

How to Fix Cannot Delete a OneDrive File Still in Session
Product
Microsoft OneDrive
Device & OS
not provided
Scenario
Attempting to delete a synchronized or shared file from a local OneDrive folder or the web interface.
Observed behavior
OneDrive blocks the deletion, displaying an error that the file is open in another device, browser session, or by a guest collaborator.
Before you start

Ensure you are connected to the internet so that your local OneDrive client can properly communicate with the cloud to update file statuses.

Solution 1Recommended

Close All Active Sessions and Delete via OneDrive Web

By closing the file on all connected devices and managing it directly from the cloud interface, you can bypass local file locks.

Often, a file is kept in session because it was left open in a browser tab or on a secondary device, preventing any modifications to its status.

1
Close the file everywhere

Verify that the file is completely closed on all your desktop applications, mobile devices, and browser tabs.

2
Revoke sharing permissions

Right-click the file, select 'Manage access', and stop sharing to ensure no guests currently have an active session open.

3
Delete from the web interface

Log into OneDrive.com through your web browser, locate the file, right-click it, and select 'Delete' directly from the cloud portal.

Close All Active Sessions and Delete via OneDrive Web
Web Deletion Priority: Deleting from the web interface usually forces the local client to drop its lock and remove the file during the next sync cycle.
Free Microsoft Office alternative

Manage and Edit Your Documents Seamlessly with WPS Office

If you are tired of dealing with complex file locks, syncing errors, and expensive subscriptions, WPS Office offers a lightweight, intuitive, and highly compatible alternative. Enjoy seamless document editing and reliable built-in cloud integration without the hassle.

  1. 1. Download and Install: Get the free WPS Office application from the official website and run the quick installer.
  2. 2. Open Your Files: Launch WPS Office and easily open any existing Word, Excel, or PowerPoint files stored on your local drive or cloud storage.
  3. 3. Edit and Save: Make your edits with full formatting support and save directly to WPS Cloud or your preferred local folder.
100% compatible with Microsoft Office formats including DOCX, XLSX, and PPTXBuilt-in WPS Cloud for reliable, straightforward file syncing and sharingLightweight software that runs smoothly on Windows, Mac, and Linux without bogging down your systemFamiliar tabbed user interface allows you to manage multiple documents in a single window
microsoft office alternative - wps office

Frequently Asked Questions

Why does OneDrive say my file is in use when it's closed?

This usually occurs if a background synchronization process is stuck, or if the file was recently accessed via an Office web app and the cloud session hasn't completely timed out yet.

Does removing a sharing link immediately end a guest's session?

Removing sharing access prevents new users from opening the file, but if someone currently has the file open in their browser, they may still maintain a temporary hold on it until they close their tab.

Can I force delete a file using Command Prompt?

Yes, if the local file is locked, you can open Command Prompt as an administrator and use the 'del' command followed by the file path. However, it is safer to pause OneDrive syncing first to prevent sync conflicts.