For your information governance plan, you can set retention rules for Google Drive files and specify how long they are retained in Drive. For example, you can specify that some files should be kept for 7 years. Or that other files should be deleted after their retention period ends.
In this article, learn how retention rules work with Drive items, how to choose data to retain, how to set a retention period, and more.
- Important information about Drive & retention
- About scope, conditions & duration
- Create a custom Drive retention rule
- Create the default Drive retention rule
- Delete a custom Drive retention rule
- Delete the default Drive retention rule
Important information about Drive & retention
Before you set retention rules, we strongly recommend you read about how retention works and review the Drive files supported in Vault.
Data that is retained:
- Files in users’ Drives and shared drives
- Email layouts
- Files encrypted with Google Workspace client-side encryption
- Google Meet data, unless Meet-specific retention is turned on
Data that is not retained:
- Folders and Drive shortcuts
- Google Sites, unless Sites-specific retention is turned off
- Linked files
- External files shared with your users
- Sites created in classic Sites
Note: By default, Drive retention rules apply to Meet data but not to Sites. To change which data Drive rules cover, turn on Meet-specific rules and change Sites retention settings.
For details, go to the sections for Drive, Meet, and Sites in Supported services and data types .
- When you create or update a retention rule, it can take up to 24 hours for the rule to propagate. Files deleted by users during this propagation period aren't retained.
- When a retention coverage period expires and the rule is set to purge files, it can take up to 15 days for affected files to be removed from Drive. Items that have not been deleted and remain in a user's Drive or a shared drive are accessible to the user during this period.
Some Google services store their data in Drive. This data is covered by Drive retention rules as follows:
Product | Retention |
---|---|
Jamboard | Vault retains jams saved to users' Drives according to Drive retention rules. Unsaved jams are discarded when the Jamboard session ends and are unavailable to Vault. |
Google Meet | Meet recordings, notes taken by Gemini, and the logs for in-Meet chat, Q&A, and polls are covered by Drive retention rules by default.
To manage retention of Meet recordings differently from other items in Drive, you can set up retention rules for Meet. When retention rules for Meet are turned on, Drive retention rules don't apply to Meet recordings. |
Google Sites | Sites are covered by Sites retention rules by default.
To retain sites differently from other items in Drive, you can set up retention rules for Sites. When retention rules for Sites are turned on, Drive retention rules don't apply to sites. To retain sites the same as other items in Drive, you can change retention settings so sites are retained by Drive rules. |
To keep data that matches specific conditions for a set time, create a custom retention rule. To keep all service data for a set time, create a default retention rule.
Learn more about the two types of retention rules.
About scope, conditions & duration
Organizational unit versus shared drive custom retention rule scopeWhen creating a custom retention rule, you can choose the scope of the rule—Organizational unit, All shared drives, or Specific shared drives.
Organizational unit
When you apply a custom retention rule to an organizational unit, the rule applies to the files owned by users in that organizational unit.
Additionally, if you select Use the retention rules of the Drive item’s owner and collaborators under RetentionSettings, then the retention rule also applies to files in another user’s My Drive that are directly shared with a user in the selected organizational unit. For more information, go to the retention settings section below.
If a retention rule is set to purge files at the end of the retention period, Vault purges only the files owned by users in that organizational unit. Files shared from outside the organizational unit aren't purged.
If you select an organization unit and select Include items from shared drives, the retention rule applies to any item in a shared drive that your organization owns, if a user in the selected organizational unit:
- Has direct access to the item.
- Is a Member or a Guest of a shared item. Learn more about sharing files from Drive.
- Is a member of the shared drive.
- Is a collaborator of, or has access to, a shared drive subfolder containing the item.
The rules do not apply to groups, such as [email protected], or General access users.
All shared drives & specific shared drives
You can set a custom retention rule to cover all shared drives or only specific shared drives.
Only the All shared drives and Specific shared drives scopes can delete files from shared drives because shared drive files are owned by the team, and not by any specific user.
Supported editions for this feature: Business Standard and Business Plus; EnterpriseEnterprise; Education Standard and Education Plus; Essentials, Enterprise Essentials, and Enterprise Essentials Plus; G Suite Business
With a supported Google Workspace edition, you can use Drive labels to create custom retention rules. You can use the Drive label’s properties to adjust a rule’s conditions and retention period. Common conditions include rules based on a label or badged label, like Indef or Classified.
For example, an admin created a retention rule that selected files for retention based on a Drive label condition. In the image below, the admin created the condition before March 1, 2023 for the label Contract date.
Next, the admin used the Drive label to set the rule’s retention period. Here, the admin set the retention period by setting the number of retention days (100). The start of the retention period is based on the Date set on label date, and the preferred date field to use (Contract information > Contract date).
After the custom rule propagated, a user who was covered by the rule created a file in their My Drive. The file was created on February 8, 2023 and the user applied the Contract information > Contract date field with the Contract date set to February 15, 2023. The retention rule outcome was:
- The retention rule was applied. Because the contract date was set to February 15, 2023 before the condition date of March 1, 2023, the label condition passed and the rule was applied.
- The retention period began on the value of the Contract Date field set on the item. In this example, the label contract date was set to February 15, 2023, so the file will be retained for 100 days after that date. February 8, the day it was created, doesn't affect the retention period since Date created was not selected under Start of retention period.
Learn more about Drive labels.
You can set retention rules to start on a file’s original creation date, modification date, moved to trash date, or the Drive label date field.
- Upload—The timestamp when the file was uploaded to Drive
- Local—The timestamp of the original file's creation time on the source device or service
File source (client) | Creation time | Modification time |
---|---|---|
Web app | Upload |
Before April 8, 2020: After April 8, 2020: |
Google Drive for desktop | Upload | Local |
Backup & Sync | Upload | Local |
iOS | Upload | Upload |
Android | Upload | Upload |
G Suite Migrate | Local | Local |
Drive API | Can be set by caller | Can be set by caller |
Files in the Drive trash can be deleted two ways. First, by default, Drive deletes trash files 30 days after they’re moved there. Second, a user can manually delete items in the trash.
Note: Files deleted from trash can be recovered by a Google Workspace administrator for up to 25 days. Learn about recovering deleted files.
In Vault, you can set rules to control how long files that were trashed remain available to Vault before they are deleted. These rules are called moved-to-trash rules.
For example, if you set a moved-to-trash rule with a 5-day retention period, a file in trash is automatically deleted 5 days after it’s moved there. Even though admins can still restore the file for 25 days, it’s no longer available to Vault. If a user deletes a file from trash 2 days after they moved it there, the file is available to Vault for 3 more days and recoverable by admins for 25 days, or longer if the item is on hold.
A moved-to-trash rule:
- Affects files owned by the user or shared drive the rule applies to.
- Applies to files moved to trash on or after August 1, 2016.
- Can’t have an indefinite retention period.
- Overrides other Drive retention rules, including other custom rules that expire later. If multiple moved-to-trash rules apply to a file, the file is retained according to the rule with the latest expiration date.
- Is overridden by holds.
- Does not apply to items that are restored from trash.
To create a moved-to-trash rule, in Step 7 below, set the start of the retention period to Date moved to trash.
You choose how retention rules are applied to a user’s My Drive data. The rules can apply to the My Drive item’s owner and all collaborators (viewers, commenters, and editors) or just the owner.
Applying the retention rule to the owner and all collaborators retains the most amount of data and is the most common choice. Applying the retention rule to just the owner might retain less data.
- Sign in to vault.google.com.
- Click RetentionSettings.
- Next to Retain users’ Drive items using the owner’s and collaborators’ rules, choose one:
- Use the retention rules of the Drive item's owner and collaborators—Apply the rules of the owner and all users with direct access to the item.
- Use the retention rules of the Drive item's owner only—Apply the rules of only the owner of the Drive item.
Warning: If the retention times of the Drive item's owner are shorter than a collaborator's, data might be immediately purged.
Create a custom Drive retention rule
Note: To set retention duration on Drive label date fields, first create a Drive label condition with a date field. Learn how to create Drive labels for your organization.
- Sign in to vault.google.com.
- Click RetentionCustom RulesCreate.
- Next to Service, select Driveclick Continue.
- Choose the scope of your rule:
- Organizational unit—Apply the rule to a specific organizational unit:
- Click the field and choose an organizational unit.
- (Optional) If you want the rule to be applied to any item in a shared drive that your organization owns, and if a user in the selected organizational unit is a direct member of the drive or has direct access to the item, turn on Include items from shared drives. This option can extend retention, but not delete files. For more information, see All shared drives and specific shared drives.
- All shared drives—Apply the rule to all shared drives in your organization.
- Specific shared drives—Apply the rule to one or more shared drives.
Select the shared drives and click Add. If you have many shared drives and the list is paginated, your selection is preserved as you change pages. If you check the Select all box at the top of the list, it selects only the current page. You can also search the list by a member’s email or by the shared drive’s name.
- To filter the list by the email address of a member:
- Click Find by member email.
- Enter one or more accounts.
- Click Find.
- To filter the list by the name of the shared drive (if your organization has less than 1,000 shared drives):
- Click Filter by name and enter letters in the name of the shared drive. For example,
pr
matches shared drives named “Sales projects”, “Marketing Projects”, and “Product management”, but not “Repairs”.The paginated list automatically updates as you add letters.
-
Check the box or boxesclick Enter.
- Click Filter by name and enter letters in the name of the shared drive. For example,
- To find the shared drive by name (if your organization has more than 1,000 shared drives):
- Click Find by shared drive name.
- Enter one or more words in the name of the shared drive. Note: Words must be exact and complete. For example,
marketing, projects
matches shared drives named “Marketing projects Q4’22” and “Projects for marketing”. It doesn’t match a shared drive named “Marketing project archive” because “project” doesn’t end with an “s”. Similarly,ma
doesn’t match any of these shared drives because it’s only part of a word, not the complete word. - Click Find.
- To filter the list by the email address of a member:
- Organizational unit—Apply the rule to a specific organizational unit:
- Click Continue.
- (Optional) Add Drive label conditions:
- Click Add Label Condition.
- Select a label titleclick Add.
- Select the values.
- (Optional) Create another label condition.
- Click Continue.
-
Choose how long to keep files:
- To permanently retain files covered by this rule, select Indefinitely.
- To purge files after a set time:
- Select Retention period.
- Enter the number of days of the retention period, from 1 to 36,500.
- Select when to start the file's retention period:
- To start the retention based on an event related to a file, click Start of retention periodselect Date created, Date modified, or Date moved to trash.
- To start the retention based on a Drive label’s date field condition (see Step 6), click Start of retention period select Date set on label date field. Then select a date field. The retention period for an item begins at the value of that date field.
- Select what to do with files when the retention period ends:
- Purge only permanently deleted items—This option purges expired items that are emptied from the Trash folder. Users don’t have access to them and don’t expect to keep them. To purge only files that are already emptied from the users' Trash, choose this option.
- Purge all items in users’ Drives, including items that aren’t permanently deleted—This option purges all expired items, including items in users’ Drive folders. It might purge items users expect to keep. To purge all files, including files that aren't deleted, choose this option.
Warning: Vault allows Drive to immediately purge files that exceed the retention period when you submit the rule. The purged data can include data that users expect to keep. Do not proceed to the next step until you’re sure the rule is configured correctly.
- Click Create. If you set a retention period, check the confirmation box and click Accept.
Create the default Drive retention rule
The default retention rule applies to files in Drive, including files in shared drives that aren't covered by a custom rule or a hold.
- Sign in to vault.google.com.
- Click Retention. The list of default rules opens.
- Click Drive .
-
Choose how long to keep files:
- To permanently retain files covered by this rule, select Indefinitely.
- To purge files after a set time:
- Select Retention period.
- Enter the number of days of the retention period, from 1 to 36,500.
- Select when to start the file's retention period:
- To start the retention based on an event related to a file, click Start of retention periodselect Date created, Date modified, or Date moved to trash.
- To start the retention based on a Drive label’s date field condition (see Step 6), click Start of retention period select Date set on label date field. Then select a date field. The retention period for an item begins at the value of that date field.
- Select what to do with files when the retention period ends:
- Purge only permanently deleted items—This option purges expired items that are emptied from the Trash folder. Users don’t have access to them and don’t expect to keep them. To purge only files that are already emptied from the users' Trash, choose this option.
- Purge all items in users’ Drives, including items that aren’t permanently deleted—This option purges all expired items, including items in users’ Drive folders. It might purge items users expect to keep. To purge all files, including files that aren't deleted, choose this option.
Warning: Vault allows Drive to immediately purge files that exceed the retention period when you submit the rule. The purged data can include data that users expect to keep. Do not proceed to the next step until you’re sure the rule is configured correctly.
- Click Create. Check the confirmation box and click Accept.
Delete a custom Drive retention rule
- Sign in to vault.google.com.
- Click RetentionCustom Rules.
- Point to the custom ruleclick Delete.
Warning: Data covered by this rule that isn’t protected by holds or other retention rules might be immediately purged.
- To confirm, click Delete again.
Delete a default Drive retention rule
- Sign in to vault.google.com.
- Click Retention. The list of default rules opens.
- Point to Drive click Delete.
Warning: Data covered by this rule that isn’t protected by holds or other retention rules might be immediately purged.
- To confirm, click Delete again.