How to Disconnect a Deleted SharePoint Library from OneDrive Sync
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.

- 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.
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.
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.
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.
In the Settings window, navigate to the 'Account' tab on the left sidebar to view all locations currently syncing to your device.
Find the name of the deleted SharePoint library in the list. Click 'Stop sync' next to it. Confirm your choice if prompted.
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.

Reset the OneDrive App
Use this method if the deleted SharePoint library is no longer listed in your OneDrive account settings, but the folders are still stuck in File Explorer.
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.

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.




