A retention policy moves the files of a folder of your organization to the trash a number of days after they last changed, or after they were added, so that what should not be kept for ever is not. It is part of the Business Plus and Enterprise plans, for admins whose role includes compliance.

In the Data governance tab of the organization, under Retention policies, choose New policy: the folder (the folders in it are included), the number of days (up to 3,650, ten years), and whether they count from the last change or from when the file was added. Every hour, the files past their days go to the trash of the folder’s owner, and the admin who set the policy is told how many. They can be restored from there for as long as the plan keeps deleted files.

Files locked for editing, and files a write-once protection keeps unchanged, stay where they are. To keep files for at least a time, protect the folder instead (Protect a folder against ransomware or changes). A legal hold keeps what it covers from being deleted for good, in the trash too.