I found a workaround for this problem. You can use a tool to automatically delete the OneDrive folders from your libraries every time you log on to your PC.
Here are step-by-step instructions:
Step 1. Go to*
Windows Libraries Command-Line Tools - The Grim Admin and download the tool
Step 2. Extract the downloaded .zip folder, open the "ShLib" folder and move the file "ShLib.exe" to %userprofile%
Step 3. Press the Windows key and type "Task Scheduler", press Enter
Step 4. In the Task Scheduler application, select "Create Basic Task" on the right
Step 5. Enter any name for the task and click Next
Step 6. Select "When I log on" and click Next
Step 7. Select "Start a program" and click Next
Step 8. Under "Program/script", enter the path of the*"ShLib.exe" file you downloaded
Step 9. Under "Add arguments", enter the following:
remove "%userprofile%\AppData\Roaming\Microsoft\Windows\Libraries\Music.library-ms" "%userprofile%OneDrive\Music"
(this will remove the OneDrive folder from your Music Library)
Step 10. Click Next, then select "Open the properties dialogue for this task when I click Finish" at the bottom, then click Finish
Step 11. In the Properties window, go to the "Triggers" tab
Step 12. Select the "At log on" trigger and click Edit at the bottom
Step 13. Check "Delay task for" and enter "1 minute", then click OK
Step 14.*In the Properties window, go to the "Actions" tab
Step 15. Click "New" at the bottom
Step 16. Under "Program/script", enter the path of the*"ShLib.exe" file*you downloaded
Step 17. Under "Add arguments", enter the following:
remove "%userprofile%\AppData\Roaming\Microsoft\Windows\Libraries\Pictures.library-ms" "%userprofile%OneDrive\Pictures"
(this will remove the OneDrive folder from your Pictures Library)
Step 18. Click OK
Step 19. Click "New" at the bottom
Step 20. Under "Program/script", enter the path of the*"ShLib.exe" file*you downloaded
Step 21. Under "Add arguments", enter the following:
remove "%userprofile%\AppData\Roaming\Microsoft\Windows\Libraries\Documents.library-ms" "%userprofile%OneDrive\Documents"
(this will remove the OneDrive folder from your Documents Library)
Step 22. Click OK, then OK again, and you're done!