If a Retention policy is enabled and actively retaining content and you want to stop using it, how can you safely do this? I tested this out by setting up a Retention policy to retain content against a SharePoint site and made changes to some content in the site so the Preservation Hold library (PHL) was provisioned and storing content.
[UPDATE April 19, 2020] I’m currently testing the timing of deleting SharePoint sites after a retention policy has been removed. Results are at the end of this post. As time permits, I will update this post with all of the scenarios.
Caution: this is a common requirement when you’re testing retention policies to ensure your cleaning up after testing. If you’re doing this in a production environment where you’re retaining production content, be aware of what this can do to content being retained.
Refer to Update MC182494: Enhancements to the Preservation Hold Library in your message center for details on how items in the PHL and the recycle bin will be handles to allow for grace periods before the content within it will be permanently deleted. This update is for Enhancements for SPO Preservation Library
Reference for retention policies in Office 365: Overview of retention policies
Option 1: Toggle the ‘On’ button to ‘Off’ for the Retention policy
After doing this, the policy will initially go into an Off(Pending) status. I waited for a short period of time (< 15 minutes), and the status went to Off(Success). I ensured the Retention policy was no longer in effect by making a change to a document and verifying nothing was added to the PHL. The PHL’s content will remain on the site for a (by default) 30-day grace period after which the content will be deleted and will be placed in the second-stage recycle bin for 93 days.
Note: the PHL will remain, only the content within it will be deleted.
Conversely, if you want to re-enable the Retention policy again and continue preserving the content, you can switch the status to ‘On’. Once the status is On(Success), the Retention policy will resume its work on all published locations and content will again be retained in the PHL. If you are within the 30-day grace period, the pre-existing PHL content will remain.
Option 2: Delete the Retention policy without toggling the button to ‘Off’ first
Rather than turning the policy ‘Off’, what happens if you delete the Retention policy while it’s still in an On(Success) status? When deleting the policy, it will pop open a confirmation window. If you select ‘yes’, the Retention policy will be deleted! After a few minutes (< 15 minutes in my case), the Retention policy is deleted and the PHL will no longer be updated. I also confirmed with PowerShell that the Retention policy was gone via the Get-RetentionCompliancePolicy cmdlet.
What happens to the content on the site once the Retention policy is disabled/deleted?
Assuming there are no other Retention policies in effect, the content on the site, including the PHL content will remain and the PHL will no longer be updated for a 30-day grace period. After this grace period, the PHL content will follow normal Recycle bin processing from that point. (going to the second-stage recycle bin)
What is the recommended way to remove a Retention policy?
If you want to keep the Retention policy definition around, then deactivating it is a smart choice. If you don’t care, it doesn’t appear to make a difference if you disable the Retention policy prior to deleting it… eventually the policy is disabled/deleted and the PHL content will be cleaned up within the grace period defined.
Can I delete a site after the Retention Policy has been turned off?
After 93 days… yes. The site will go in the Deleted sites section of the SharePoint Admin Center. It will remain there for 93 days (normal behavior for a deleted site)
After 30 days… (still testing – will update soon)
After Retention Policy is turned off… (still testing – will update soon)
Thanks for reading.