---
title: "Data retention in SitecoreAI"
slug: "data-retention"
abstract: "Learn about the data availability durations and retention limits that apply to profiles, sessions, events, affinities, audiences, and data lake in SitecoreAI."
---
# Data retention in SitecoreAI

To ensure efficient performance, SitecoreAI applies retention durations to the data generated across its capabilities. When data exceeds these limits, it's no longer available.

Data retention limits are per environment.

## Profiles

If a [profile](https://doc.sitecore.com/sai/en/users/sitecoreai/audience-and-insights/profiles.html) is identified, SitecoreAI retains the profile for an indefinite amount of time. This means you could still view a site visitor's profile after several years, but if the data inside the profile exceeds the limits described in this topic, the data will not be available.

Here are the data retention durations for profiles:

| Profile type | Retention duration |
| --- | --- |
| Identified profiles | There is no limitation for how long SitecoreAI retains an identified profile. These are site visitors who have been matched and linked through your organization's [identity rules](https://doc.sitecore.com/sai/en/users/sitecoreai/audience-and-insights/identity-resolution.html).<br><br>Profile extension data persists indefinitely, regardless of the retention duration of the profile it's attached to. |
| Visitor profiles (unidentified) | Visitor profiles are retained for 6 months from the last date they were active. After 6 months of no activity, the profile is removed. |

### Sessions and events

- *Sessions* - the last 40 sessions within the last 90 days are retained per profile.
- *Events* - the last 100 events per session are retained. Only events from the last 40 sessions within the last 90 days are retained.

## Affinities

[Affinity](https://doc.sitecore.com/sai/en/users/sitecoreai/audience-and-insights/affinities.html) scores are retained on a profile for 30 days.

## Audiences

[Audience](https://doc.sitecore.com/sai/en/users/sitecoreai/audience-and-insights/audiences.html) membership data is retained for 15 months.

## Data lake

Data is retained in the [data lake](https://doc.sitecore.com/sai/en/developers/sitecoreai/data-lake-export-service.html) for 4 years.

## Environment logs

Log files for your SitecoreAI [environment](https://doc.sitecore.com/sai/en/developers/sitecoreai/deploying-sitecoreai/deploy-app/manage-an-environment.html) are stored for 90 days. To retain log files longer, [download them using the CLI](https://doc.sitecore.com/sai/en/developers/sitecoreai/sitecore-command-line-interface/sitecore-cli-command-reference/the-cli-cloud-command/the-cloud-environment-command.html) or the Deploy app.