"You have to delete all the items in this folder before you can delete the folder" on oneDrive

I use oneDrive Business provided by my college and synced all my personal folders, but I can't delete folders at once–I gotta open the thousands of folders and delete the subfolders in them first until I can delete the folder.

I want to clear all my oneDrive volume and restart.


Hi Xiaoxiang,


Based on your description and the error message, this kind of issue is always related to the site/library which is on hold.


For example, if your OneDrive for Business URL is:

https://domain-my.sharepoint.com/personal/username_domain_onmicrosoft_com/_layouts/15/onedrive.aspx, please modify it to the following:

https://domain-my.sharepoint.com/personal/username_domain_onmicrosoft_com/_layouts/15/viewlsts.aspx?view=14 and then access this URL. Then you will log into the OneDrive site content page.  Please check if there is a library called Preservation hold library.


In addition, to check if the site is on hold or if the site is protected by any DLP, please involve your Office 365 admin to verify it from the Office 365 Security and Compliance center.

1.Let admin browse to https://protection.office.com/#/homepage 

2.Then Go to ‘Retention’ Under Data Governance and see if DLP policy is created for any preservation.

3.Under ‘Search & Investigation’ go to eDiscovery and see if any holds are created.

More info on Holds and DLP: 

Add content to a case and place sources on hold in the eDiscovery Center

Overview of data loss prevention policies


Let me know the updates when you have time.




5 people found this reply helpful


Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.


Question Info

Last updated May 6, 2021 Views 21,406 Applies to: