# Managing project history

One of the most powerful features of SonarQube Server is that it shows you not just your project health today, but how it has changed over time. It does that by selectively keeping data from previous analyses (see [Housekeeping](/sonarqube-server/2025.2/instance-administration/system-functions/housekeeping.md)). It doesn’t keep all previous analyses. That would bloat the database. Similarly, for the analyses it does keep, SonarQube Server doesn’t keep all the data. Once a project snapshot moves from being the "last analysis" (i.e., the most recent) to being part of the project’s history, data below the project level is purged to keep from bloating the database.

Typically these aren’t things you need to even think about. SonarQube Server just handles them for you. But occasionally you may need to remove a bad snapshot from a project’s history or change the housekeeping algorithms.

To manage the history of your project, you must be a project administrator.

## Deleting a snapshot <a href="#deleting-snapshot" id="deleting-snapshot"></a>

Occasionally, you may need to manually delete a project snapshot, whether because the wrong quality profile was used, or because there was a problem with analysis, and so on. Note that the most recent snapshot (labeled **Last snapshot**) can never be deleted.

To delete a snapshot of your project:

1. Go to the [Viewing project activity](/sonarqube-server/2025.2/user-guide/viewing-projects/activity-and-history.md).
2. In the left panel, in front of the snapshot you want to delete, select the three-dot menu.
3. In the contextual menu, select **Delete Analysis**.

<div align="left"><figure><img src="/files/VZkoDSKlf6PrMjqDBNzC" alt="Deleting the project’s snapshot" width="375"><figcaption></figcaption></figure></div>

{% hint style="warning" %}
The snapshot is actually deleted during the next project analysis.
{% endhint %}

## Editing a snapshot <a href="#editing-snapshot" id="editing-snapshot"></a>

For every snapshot, it is possible to manually:

* Add, rename or remove a version.
* Add, rename or remove an event.
* Delete the snapshot

To edit a snapshot of your project:

1. Go to the [Viewing project activity](/sonarqube-server/2025.2/user-guide/viewing-projects/activity-and-history.md). The snapshots are listed in the left panel.
2. To add a custom version or an event to a snapshot:
   * In front of the snapshot you want to configure, select the three-dot menu.
   * In the contextual menu, select **Create Version** or **Create Custom Event**, respectively.
3. To edit or delete a custom version or event:
   * In front of the custom version or event you want to manage, select the edit or delete icon.

<div align="left"><figure><img src="/files/FXXm81YeyAOfEGpUL6Rc" alt="Editing the project’s snapshot" width="375"><figcaption></figcaption></figure></div>

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Viewing project activity](/sonarqube-server/2025.2/user-guide/viewing-projects/activity-and-history.md)


---

# 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-server/2025.2/project-administration/managing-project-history.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.
