logo
search
OneDrive File Issues

How to Disconnect a Deleted SharePoint Library from OneDrive Sync

Maira MehtabMaira Mehtab Sep 28, 2026 870 views

Question details

The user needs to remove local folders from File Explorer for a SharePoint site that was deleted before its synchronization connection was stopped in OneDrive.

How to Disconnect a Deleted SharePoint Library from OneDrive Sync
Product
Microsoft OneDrive and SharePoint
Device & OS
Windows
Scenario
Trying to clean up the local File Explorer view after a company SharePoint site was permanently deleted, but the folders remain stuck.
Observed behavior
Folders remain visible in File Explorer under the company SharePoint location. Attempting to delete them results in error 0x8007018B, and there is no standard network-drive 'Disconnect' option available upon right-clicking.
Before you start

Ensure you are signed into your OneDrive desktop application with your work or school account. Do not attempt to manually delete the placeholder folders directly in File Explorer until you have formally stopped the synchronization.

Solution 1Recommended

Stop Sync via OneDrive Settings

Use this method to formally break the synchronization relationship between your PC and the deleted SharePoint library.

Because SharePoint libraries are synchronized via the OneDrive app rather than mapped as traditional network drives, they lack a standard right-click 'Disconnect' option. You must manage this relationship directly inside the OneDrive application settings.

1
Open OneDrive Settings

Click the OneDrive cloud icon in your Windows system tray (bottom-right corner of the taskbar). Click the gear icon (Help & Settings), and select 'Settings' from the menu.

2
Locate the Account Tab

In the Settings window, navigate to the 'Account' tab on the left sidebar to view all locations currently syncing to your device.

3
Stop Sync for the Library

Find the name of the deleted SharePoint library in the list. Click 'Stop sync' next to it. Confirm your choice if prompted.

4
Delete the Local Folder

Once the sync is stopped, open File Explorer, navigate to the SharePoint folder, and safely delete the remaining local files or folders. Error 0x8007018B should no longer appear.

Stop Sync via OneDrive Settings
Safe Deletion: By stopping the sync first, you safely detach the folder from OneDrive's cloud processes, allowing standard Windows file deletion to work without triggering sync errors.
Free Microsoft Office alternative

Manage Your Documents Seamlessly with WPS Office

Dealing with complex SharePoint and OneDrive synchronization errors can be frustrating. If you are looking for a reliable, lightweight alternative for your document management, WPS Office provides a streamlined experience without the hassle of rigid cloud sync requirements.

Highly compatible with Microsoft Word, Excel, and PowerPoint formatsLightweight installation that doesn't slow down your PCFree to use with an intuitive, familiar user interfaceBuilt-in PDF editing and powerful local document management tools
microsoft office alternative - wps office

Frequently Asked Questions

Why do I get error 0x8007018B when trying to delete a SharePoint folder?

Error 0x8007018B occurs because you are attempting to delete a cloud placeholder file while the OneDrive app is still actively trying to sync it. Even if the online SharePoint site was deleted, the local OneDrive client must be told to stop syncing before it will release its lock on the files.

Why is there no 'Disconnect' option when I right-click the SharePoint folder?

The 'Disconnect' option is only available for traditional mapped network drives. SharePoint libraries synchronized to File Explorer via the modern OneDrive sync client are managed entirely within the OneDrive app settings, not via Windows network drive settings.

Can I just delete the local placeholder files to fix the issue?

No. Deleting placeholder files before stopping the synchronization can trigger errors like 0x8007018B. Furthermore, if the cloud location hasn't been permanently deleted, doing so might accidentally delete files for other users on your network. Always use 'Stop sync' in OneDrive first.

What if the deleted SharePoint library doesn't appear in my OneDrive settings?

If the stale library isn't listed under the Account tab in your OneDrive settings, you will need to reset the OneDrive application. Resetting forces OneDrive to resync your account data and automatically clear out any orphaned SharePoint links.