# Configure Data Retention

Source: https://userguide.qualytics.io/settings/platform-defaults/how-tos/configure-data-retention/

Choose how long Qualytics keeps inactive assets. See [Data Retention](https://userguide.qualytics.io/settings/platform-defaults/deep-dive/data-retention/) for policy rules and safeguards, or use the [API](https://userguide.qualytics.io/settings/platform-defaults/api/#retention-periods) to configure periods programmatically.

> **Info: Permission Required**
>
> You need the **Admin** user role to configure Data Retention and preview its impact.

## Before You Enable Retention

A policy without a period is **Off**. Existing inactive-anomaly cleanup settings are retained on upgrade. An off policy performs no automatic cleanup; other enabled policies still apply. Hard deletion and user purge are permanent, so review the estimated impact before saving. A period applies to existing assets as well as assets created afterward. Choose a stale-check period longer than the normal gap between scans.

## Steps

**Step 1**: Open **Settings**, select **Defaults**, and choose **Data Retention** in the left rail, alongside Observability, Sync, Profile and Scan.

**Step 2**: Set a period in days for each policy you want to enable. Type a whole number from **30 to 36,500**, or **1 to 36,500** for inactive anomalies, or pick **Month**, **Quarter** or **Year** from the period chip at the end of the field. To turn a policy off, pick **Off** from the same chip or clear the value. A policy that is off says so under its field. Otherwise, the hint under the field states when its period starts.

The six policies are **Archive inactive checks**, **Delete archived checks**, **Delete inactive datastores and connections**, **Remove deactivated users’ personal data**, **Delete archived anomalies**, and **Archive or delete inactive anomalies**. Expand the question under a policy, such as **What happens when a check is archived?**, to see what the policy does to each kind of asset. Retention applies across the deployment, so there is no **Apply to existing datastores** option.

For **Archive or delete inactive anomalies**, a **Cleanup rules** group appears once the policy has a period. In **Action**, choose an archive status under **Archive as** (**Resolved**, **Invalid** or **Discarded**), or choose **Permanently delete**. In **Which anomalies**, choose the statuses to cover, or leave it empty to include every status. Archiving reaches only open anomalies, so it offers **Active** and **Acknowledged**; deleting offers every status. Retained datastore and tag filters are shown in a notice.

**Step 3**: Click **Preview impact**. Under **The next run would remove**, the preview lists each policy with its estimated counts. A policy with no period shows **Off**. Previewing does not change any assets. If the preview fails, preview again before saving.

**Step 4**: Review the counts and click **Save Data Retention**. The Save button stays disabled until the periods are valid and a preview has succeeded for those exact values. If you change a period, action or status after previewing, a **Preview is out of date** warning appears; click **Preview impact** again before saving.

**Step 5**: A success message appears. The saved periods are used when the corresponding Data Retention Flow actions next start; saving does not start cleanup immediately.

**Step 6**: Review the saved schedule under **How retention works**. A warning icon  appears next to **Data Retention Flow** if the Flow is deactivated; hover over it to see that scheduled cleanup is paused. Click the **Go to Flow**  arrow next to **Data Retention Flow** to open the controlling Flow. As an Admin, you can change its schedule, description or activation, add notification or workflow actions, and review execution history. Its name, scheduled trigger type and Retention actions are fixed. Each Retention action shows its saved period, and its **Go to Data Retention settings**  arrow links back to these settings.

> **Note: Execution can differ from preview**
>
> Preview counts are per policy and can overlap. Related records may also be deleted. Counts are estimates. Activity, dependencies or other runs can change what is eligible before cleanup reaches it. Execution records report completed work and skipped assets.

## Related

- [Data Retention](https://userguide.qualytics.io/settings/platform-defaults/deep-dive/data-retention/): permanent removal, user purge, system Flow restrictions and processing limits.
- [Platform Defaults Permissions](https://userguide.qualytics.io/settings/platform-defaults/deep-dive/permissions/): access by user role.

*Last updated: November 23, 2026.*
