This version of the SonarQube documentation is no longer maintained. It relates to a version of SonarQube that is not active.

See latest version
Start Free
10.3 | Project administration | Managing project history

Managing project history

On this page

One of the most powerful features of SonarQube 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). It doesn't keep all previous analyses. That would bloat the database. Similarly, for the analyses it does keep, SonarQube 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 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.

Managing history

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.

At the project level, from the front page Activity list, choose Show More to see the full activity list.

For every snapshot, it is possible to manually:

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

About inactive projects

Projects that are not analyzed for seven consecutive days are considered inactive, and SonarQube automatically deletes their cached data to free space in the database. See Branch analysis for more information on inactive branches and cached data.

The Projects Management search interface includes a date picker to help you find all projects last analyzed before your specified date. From there you can deal with them on this page as a set, or click through to the individual project homepages for individual attention and administration.

In Administration > Projects > Management search for Last analysis before to filter projects not analyzed since a specific date. Then use bulk Delete to remove the projects that match your filter.

This can be automated by using the corresponding Web API: api/projects/bulk_delete?analyzedBefore=YYYY-MM-DD.


Was this page helpful?

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARQUBE, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License