SharePoint site owners often need to remove a library from OneDrive sync when users report sync errors, when a library is replaced by a newer version, or when a project ends. The sync feature in OneDrive can leave stale connections that cause confusion or duplicate files. This article explains the complete process for SharePoint owners to stop library sync across their organization, including the steps each user must follow and the admin controls available. By following this checklist, you can clean up sync relationships without data loss.
Key Takeaways: Remove SharePoint Library Sync
- OneDrive > Settings > Account > Stop sync: Each user must stop sync from their OneDrive client to remove the local connection.
- SharePoint admin center > Policies > Sharing: Block external sharing to prevent new sync invitations while you clean up existing ones.
- Site Settings > Library Settings > Permissions: Remove user access to the library to force sync disconnection after the user stops sync.
Why a SharePoint Library Stays in OneDrive Sync
When a user syncs a SharePoint document library to OneDrive, the OneDrive sync app creates a local copy and maintains a background sync relationship with the SharePoint server. This relationship is stored in the user’s OneDrive settings and in SharePoint’s sync metadata. Even after a SharePoint owner deletes the library or changes permissions, the user’s OneDrive client may still show the library as syncing because the local connection remains active. The sync relationship is not automatically removed when you change SharePoint settings. You must follow a deliberate sequence of steps to break the link cleanly.
The sync app uses a unique identifier for each library. If you only remove user permissions, the sync app will show an error but may keep the folder structure locally. If you only delete the library, users still see a broken shortcut in File Explorer. The correct approach is to have each user stop sync first, then clean up permissions or the library itself. As a SharePoint owner, you can also use PowerShell to check which libraries are synced by which users, but you cannot remotely stop sync for a user.
Checklist to Remove a SharePoint Library From OneDrive Sync
Follow these steps in order. Do not skip the user communication step. Each user must take action on their own device.
- Notify all users who sync the library
Send an email or Teams message to every user who has the library synced. Tell them to stop sync using the instructions in step 2. Provide a deadline of 48 hours. Without this notification, users will lose work or see sync errors when you change permissions. - Each user stops sync from OneDrive
In Windows 10 or Windows 11, click the OneDrive cloud icon in the notification area. Select Help & Settings > Settings. Go to the Account tab. Under the synced libraries list, find the SharePoint library. Click Stop sync. Confirm the action. The local folder remains but is no longer synced. Users can delete the folder manually. - Remove user permissions from the SharePoint library
Go to the SharePoint site. Navigate to the library. Click the gear icon and select Library settings. Click Permissions for this document library. Remove all users and groups that should no longer have access. This prevents accidental re-sync if a user restarts OneDrive. - Verify that the library is no longer syncing
As a test, sign in to a user account that previously synced the library. Open OneDrive settings and check the Account tab. The library should no longer appear in the list. If it still appears, the user must repeat step 2. - Optionally delete the library
If the library is no longer needed, go to Library settings and click Delete this document library. Confirm deletion. This removes the library from SharePoint entirely. Users who did not stop sync will see a sync error.
If Users Cannot Stop Sync on Their Own
Some users may have left the organization or lost access to their device. In that case, you must use alternative methods to break the sync relationship.
User left the company and their device is still syncing
Remove the user’s Microsoft 365 license or delete the user account in the Microsoft 365 admin center. This forces the OneDrive sync app to stop syncing on that device within 24 hours. The device will show a sync error, but the connection is broken.
User cannot access OneDrive settings due to a broken app
Ask the user to uninstall and reinstall the OneDrive sync app. After reinstallation, the sync relationships are cleared. The user must not sign in to OneDrive until you have removed their permissions to the library.
SharePoint Owner vs User Actions: What Each Role Can Do
| Action | SharePoint Owner | User |
|---|---|---|
| Stop sync on a user’s device | Cannot do remotely | Must do via OneDrive settings |
| Remove user permissions from library | Can do in Library settings | Cannot do |
| Delete the library | Can do in Library settings | Cannot do |
| Block future sync of the library | Can set library to read-only | Cannot do |
| Check which users have synced the library | Can use PowerShell Get-SPOSiteGroup | Cannot do |
Common Mistakes When Removing a Library From Sync
SharePoint owners often make errors that cause data loss or prolonged sync errors. Avoid these pitfalls.
Deleting the library without notifying users first
If you delete a library while users still have it synced, their OneDrive client shows a red circle with a sync error. The local folder becomes orphaned. Users cannot see the library in SharePoint anymore, so they cannot stop sync through the normal interface. They must reset OneDrive or remove the sync relationship from the registry, which is not recommended.
Removing permissions but not stopping sync
When you remove a user’s permissions, the OneDrive sync app shows a “You no longer have access” error. The folder remains on the user’s device. The user can still copy files out of the folder. To fully remove the sync, the user must stop sync and then delete the local folder.
Using the “Stop sync” button on a shared computer
On a shared computer, each Windows user profile has its own OneDrive settings. Stopping sync in one profile does not affect other profiles on the same computer. Each person must stop sync from their own account.
Conclusion
You can now remove a SharePoint library from OneDrive sync by following the five-step checklist: notify users, have them stop sync, remove permissions, verify, and optionally delete the library. The key limitation is that you cannot stop sync remotely for any user. Always communicate with users before making permission changes. As an advanced tip, use the SharePoint Online Management Shell to run Get-SPOSiteGroup -Site $url to list all users who have access to the library, then cross-reference with your sync audit log.