Jul 18 2023 03:25 PM
Are there any clever methods known to anyone for deleting a large SharePoint library that has retention label applied to all its content? I understand we will have to individually delete each item to empty out all folders before any folder and ultimately the library can be removed. Any other ideas?
Jul 18 2023 11:44 PM
Jul 19 2023 07:21 PM
Jul 20 2023 02:55 PM - edited Jul 20 2023 02:56 PM
Adding more details...We ultimately decided to use the retention and disposal labels to accomplish this. Given the root cause behind library unable to be deleted is a long term retention label, deleting items using script was moving these to PreservationHoldLibrary where these will remain for a very long time.
As the data is duplicate and redundant, we have decided to create a new retention label to delete content after 2 days from creation date. This label will be applied to all items in library, making the built-in SharePoint function to then get rid of it for us.
Jul 21 2023 08:07 AM
Deleting the Retention Label and the Policy used to publish it would have remove the label from every single file automatically. Then you could delete the library.