# Project data lifecycle

*This page describes how SonarQube Cloud manages historical analysis data over time.*

{% hint style="info" %}
Note: We’re refreshing this page. It walks through how SonarQube Cloud handles project analysis data over time, and is not our formal data protection commitment. For that, see our Data Processing Addendum. Last reviewed: April 2026.
{% endhint %}

SonarQube Cloud retains project analysis data to allow tracking of the evolution of a project, but progressively deletes older information, including source code, measures, and most snapshots over time. Specific lifecycle behaviors apply to PR data, background tasks, and issues, with projects on a free plan being deleted after one year of inactivity. SonarQube Cloud’s project data lifecycle is outlined below.

## Data lifecycle <a href="#data-lifecycle" id="data-lifecycle"></a>

After each analysis the following is removed:

* The source code of the previous analysis.
* Measures at the directory and file levels.
* History at the package/directory level.

**PR data** is retained for four weeks after analysis. **Background tasks** are retained for 6 months. Additionally, for each project, **snapshots** of analyses (main branch, non-main branch, and pull request) are retained or removed according to the following rules:

* All snapshots are retained for one day.
* After one day, only one snapshot per day is retained.
* After one week, only one snapshot per week is retained.
* After 4 weeks, only one snapshot for every 4 weeks is retained.

In all the above cases, in addition to the single snapshot retained at each step, any snapshots marked by an event are also retained. See the [Managing project history](/sonarqube-cloud/managing-your-projects/managing-project-history.md) page for information on events.

Continuing on:

* After 2 years, only snapshots with version events are retained. Snapshots without events or with only non-version events are deleted.
* After 5 years all snapshots are deleted, including snapshots marked by version events.

Separately:

* All closed issues more than 30 days old are deleted.
* Projects in organizations on a **Free plan** that have not been analyzed for one year are automatically deleted. This also applies to projects that were created one year previously but were never analyzed. Users receive notifications of this event on the SonarQube Cloud project interface four weeks before the deletion will take place.
* Scoped Organization Tokens without an expiration date that have been inactive for 60 days are deleted.
* Personal Access Tokens that have been inactive for 60 days are deleted.

These settings cannot be customized.

*This page describes operational product behavior in SonarQube Cloud.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/project-data-lifecycle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
