logo
search
Permission & Access Issues

How to Fix a Locked File That Cannot Be Deleted in SharePoint Online

Phi Hung VoPhi Hung Vo Oct 12, 2026 871 views

Question details

The user is unable to delete a file in SharePoint Online because it remains locked by a user or process, even after attempting basic troubleshooting steps.

How to Fix a Locked File That Cannot Be Deleted in SharePoint Online
Product
SharePoint Online
Device & OS
not provided
Scenario
Attempting to delete a file located in a SharePoint document library.
Observed behavior
The file deletion is blocked due to a persistent lock, despite clearing caches, changing browsers, checking it in, and verifying user permissions.
Before you start

Ensure you have the necessary edit or delete permissions for the SharePoint document library. Wait at least 15-30 minutes, as temporary file locks from unexpected app closures often resolve themselves automatically.

Solution 1Recommended

Close Open Files and Stop Local Synchronization

A file cannot be deleted if it is actively open in a desktop application or continuously locked by the OneDrive sync client in the background.

Often, a file appears locked on the server because a user's desktop application hasn't fully closed the session, or a local sync client is holding the file open during an active sync cycle.

1
Close the document and application

Ask the user who currently holds the lock on the file to close the document and completely exit the associated Microsoft Office application.

2
Check local synchronization

Verify if the SharePoint document library is synchronized to a local computer via the OneDrive sync client.

3
Pause sync or remove local copy

If the file is synced locally, pause the OneDrive synchronization or remove the local copy of the file if appropriate. This forces the server to release the lock.

Close Open Files and Stop Local Synchronization
Tip: After stopping the local sync, refresh your SharePoint Online browser tab before attempting to delete the file again.
Free Microsoft Office alternative

Try WPS Office for Seamless Document Management

While resolving locked files in SharePoint requires platform-specific administrative steps, WPS Office provides a free, lightweight, and highly compatible alternative for handling your daily documents. Enjoy robust cloud synchronization without complex server lock issues.

Fully compatible with Microsoft Office formats (.docx, .xlsx, .pptx) to ensure zero formatting loss.Built-in WPS Cloud integration for seamless real-time syncing and file management.Lightweight software that downloads quickly and runs smoothly even on older devices.Free to use with a familiar, tabbed user interface and zero learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

How long does a temporary lock last in SharePoint Online?

A temporary lock, often caused by an unexpected application crash or network drop, typically clears on its own within 10 to 30 minutes. In rare cases, it can take up to a few hours for the server to recognize the session has ended.

Can I force unlock a file in SharePoint Online?

You cannot directly 'force unlock' a file with a single button. However, requiring check-out in the library settings, then manually checking the file out and discarding the check-out can sometimes clear a stubborn lock.

Why does the file say it is locked by me when I do not have it open?

This usually happens if your previous session did not close properly, leaving a 'ghost session' on the SharePoint server. It can also occur if your local OneDrive sync client is continuously trying to update or scan the file in the background.