If you are a hoarder, you might want to skip this article. In this post, I explain how you can delete old documents from a site using retention policies. That is correct, retention policies are not just for data retention. We can utilize the same functionality also to delete the content based on its age. This is an excellent technique to use to keep your site content under control and get rid of stuff you do not need and will probably never access again.
Two ways to delete an old content from a site using retention policies
There are two ways for you to get rid of the old stuff:
- Site Level Retention
- Label Level Retention
Delete old content using Site Retention Policy
I blogged previously about site retention policy and how it can be used to retain the documents for a given period. We can also use the same mechanism to create a “deletion policy.” Most steps are pretty much the same as in the post mentioned above, but since Microsoft recently split up the Security & Compliance Center into two, the screenshots are a bit different.
- Click on Office 365 App Launcher > Compliance
- Under Solutions, click on Information Governance
- Click on Retention
- Click on + New retention policy
- On the next screen, provide a name for the policy as well as the description. Click Next
- Since we are not retaining content, but rather deleting it, choose No, just delete content that’s older than, then set up the criteria, click Next
- Choose a specific site(s) you want to apply this policy to
- On the final screen, it provides you with a confirmation that Content that’s currently older than this will be deleted after you turn on the policy. Click Create this policy button.
- Just like with other compliance policies, it will take some time for it to be formally published, so you will see this message appearing when you click on it
- After a white, it will be published
What happens when the Site Deletion Policy takes effect?
Within less than 24 hours, the policy took effect, and I ended up with a much cleaner document library. Below screenshot shows side-by-side the same library with original on the left and “cleaned up” on the right. The highlighted items are the items that got deleted by the policy since they were last modified more than six months ago.
All the deleted items end up in the Recycle Bin (like they usually would as a result of a retention policy). Note that it states Deleted by System Account as documents were deleted by the system and not by a human. From this point, they will reside in a Recycle Bin for 93 days and get purged permanently.
Delete old content using Label Level Retention
The second option to delete old documents from a site using retention policies is to use the label retention option. The steps for the set up of deletions using the retention label are identical to the label retention process I described previously. So you would go through the same steps with label creation and then publishing it via respective policy and then applying to documents either manually or via folder or library. The only exception would be at the label creation screen, where you would set up a label for deletion…
And then choose corresponding deletion parameters (instead of retention) in the label settings screen.
What happens when the Label Deletion Policy takes effect?
Same thing as with the site retention, documents labeled with the deletion policy get deleted and moved to the Recycle Bin.