logo
search
SharePoint Document Issues

Fix Cannot Delete a SharePoint File Synced to OneDrive

WPS Content ManagerWPS Content Manager Sep 30, 2026 868 views

Question details

The user is unable to delete a locally synchronized SharePoint file (often a zero-byte file) via OneDrive, despite the file no longer being visible online.

How to Fix Cannot Delete a SharePoint File Synced to OneDrive
Product
Microsoft OneDrive and SharePoint
Device & OS
not provided
Scenario
Attempting to clean up a locally synchronized SharePoint folder after a document application crash leaves a persistent, locked zero-byte file.
Observed behavior
The zero-byte file remains in the local folder, is locked by OneDrive synchronization processes, and cannot be deleted normally by the user.
Before you start

Before attempting to delete the file locally, log into your SharePoint account via a web browser to confirm that the file has indeed been removed from the online library to prevent accidental data loss.

Solution 1Recommended

Stop Syncing and Delete the Local File

Stopping the synchronization process temporarily releases the system lock on the file, allowing you to delete it from your local drive.

When an application crashes, it can leave behind a zero-byte file that OneDrive continuously attempts to sync. This creates a file lock, preventing standard deletion. By stopping the sync for the specific SharePoint library, you remove the lock without affecting your files in the cloud.

1
Open OneDrive Settings

Right-click the OneDrive cloud icon in your system tray (taskbar) and select the gear icon to open 'Settings'.

2
Stop Syncing the Library

Go to the 'Account' tab, locate the synced SharePoint library in the list, and click 'Stop sync'.

3
Delete the Problematic File

Open File Explorer, navigate to the local SharePoint folder that contains the zero-byte file, and delete it.

4
Resume Synchronization

If necessary, return to SharePoint online and click 'Sync' to reconnect the library to your local folder.

Stop Syncing and Delete the Local File
Wait for Pending Syncs: If the file is absent online but still refuses to delete locally after stopping the sync, wait for background processes to finish or contact your SharePoint administrator before removing any cache data.
Free Microsoft Office alternative

Manage Your Documents Seamlessly with WPS Office

Tired of complicated synchronization issues and locked files? WPS Office is a free, lightweight, and easy-to-use alternative to Microsoft Office. It offers robust document management, built-in cloud storage, and seamless compatibility with all your existing files, minimizing the risk of app crashes.

  1. 1. Download WPS Office: Visit the official WPS website to download and install the free office suite on your computer.
  2. 2. Open Your Files: Open your existing Microsoft Office or PDF documents directly within WPS Office.
  3. 3. Sync Safely: Save and sync your files effortlessly using the integrated WPS Cloud without relying on external sync clients.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Built-in WPS Cloud ensures your files are synced safely without frustrating local locking issues.Lightweight installation with a user-friendly, familiar interface for seamless migration.Highly stable PDF editing features prevent crash-related zero-byte file generation.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my SharePoint file showing as zero bytes?

A zero-byte file often occurs when an application (such as a PDF editor) crashes during the save process. It leaves an empty placeholder file that OneDrive struggles to sync, resulting in an indefinite sync loop.

Will stopping the sync delete my other SharePoint files?

No, clicking 'Stop sync' only severs the connection between your local folder and the online SharePoint library. Your locally downloaded files and online cloud files will remain completely intact.

What happens when I 'Unlink this PC' in OneDrive?

Unlinking your PC signs you out of OneDrive and pauses all synchronization. Your locally saved files stay on your hard drive, and cloud files remain safe online, allowing you to troubleshoot sync locks securely.

What should I do if resetting OneDrive doesn't fix the undeletable file?

If the file remains locked even after a OneDrive reset, restart your computer in Safe Mode to prevent third-party background processes from locking the file, then attempt to delete it using File Explorer.