SharePoint synced library removed from OneDrive sync but local folder won’t delete (160GB, access denied)

Posted by javina34@reddit | sysadmin | View on Reddit | 21 comments

I’m troubleshooting a SharePoint library that was synced to File Explorer using the SharePoint Sync button (OneDrive sync client).

We removed the sync successfully and verified the library is no longer listed under OneDrive synced locations.

However, the local folder still exists at:

C:\Users\User\companyname.com\folder

The folder is no longer syncing, but it remains on disk.

I attempted:

- Deleting through File Explorer (progress reached 100% but folder remained)

- rmdir /s /q (access denied)

- Taking ownership via NinjaOne command line, but ownership became SYSTEM instead of admin

- Confirmed OneDrive sync relationship is removed

Library size is around 160GB.

Has anyone dealt with an orphaned SharePoint/OneDrive synced folder that won’t delete after unsyncing? Looking for the cleanest way to remove the local cache without affecting SharePoint online data.