How to Delete a Locked or In-Use File in SharePoint
Question details
The user needs to delete a file in SharePoint but is prevented from doing so because the file is locked or currently being viewed by another user.
- Product
- SharePoint
- Device & OS
- not provided
- Scenario
- Attempting to delete a recently uploaded document from a SharePoint site or document library.
- Observed behavior
- SharePoint displays an error message stating that the resource is locked because another person is currently viewing or accessing the file.
Ensure you have Full Control or Site Admin permissions for the SharePoint site, as modifying user access rights is required to force the file lock to release.
Temporarily Remove Access Permissions for Other Users
By temporarily revoking access for the user currently viewing the document, you can force SharePoint to release the file lock, allowing you to delete the file.
SharePoint locks files to prevent conflicting changes when someone is actively viewing or editing a document. If the user forgets to close the file or if their session hangs, the lock remains active. Managing access directly bypasses this hold.
Open your SharePoint site and go to the document library where the locked file is located.
Hover over the locked file, click the three-dot menu (ellipsis) next to the file name, and select 'Manage access' from the dropdown menu.
Locate the specific user or group who is viewing the file. Click the dropdown under their name and select 'Stop sharing' to temporarily revoke their permissions.
Wait a few moments for the system to register the permission change and release the lock. Select the file again and click 'Delete' to remove it from the library.

Manage Your Documents Seamlessly with WPS Office
While SharePoint handles complex enterprise permissions, WPS Office provides a lightweight, free alternative for editing, managing, and collaborating on your documents locally and in the cloud without restrictive file locking issues.
- 1. Download and Install: Download WPS Office Free from the official website and complete the installation on your device.
- 2. Sign In to WPS Cloud: Create a free account or log in to activate your dedicated WPS Cloud storage space.
- 3. Upload and Collaborate: Upload your Office documents to easily share links and co-edit with your team in real-time.

Frequently Asked Questions
How long does a SharePoint file stay locked after a user closes it?
Typically, SharePoint automatically releases the file lock within 10 minutes after the user properly closes the document. If the lock persists longer, you may need to manually manage access permissions to force the release.
Can I force unlock a SharePoint file without changing user permissions?
If you do not want to alter permissions, you can ask the specific user to manually close the document, or a SharePoint Administrator can end the active user session directly from the admin center.
Why does SharePoint say a file is locked when nobody is currently using it?
This 'ghost lock' often occurs if a document was closed improperly, such as during a browser crash, power outage, or network disconnection. SharePoint still believes the file is actively being viewed and maintains the lock temporarily.
Do I need admin rights to delete a locked file in SharePoint?
Yes, to bypass a file lock by changing access permissions, you must have Full Control, Site Owner, or Site Admin rights for that specific SharePoint document library.




