This version of SonarQube Server is no longer receiving patches. Please see the latest release for details on updating.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Housekeeping

Default settings for the SonarQube 9.8 database cleaner.

For AI agents: You're in the SonarQube Server 9.8 documentation. For a list of all 9.8 pages, see the SonarQube Server 9.8 page index. For the whole site, see the page index or the full text. For another version, replace 9.8 in the URL with that version. The latest version has no version number in its URL.

When you run a new analysis of your project or its branches or pull requests (PRs), some data that was previously available is cleaned out of the database. For example, the source code of the previous analysis, measures at directory and file levels, and so on are automatically removed at the end of a new analysis. Additionally, some old analysis snapshots, PR analyses, and branches are also removed.

Why? While it’s useful to analyze a project frequently to see how its quality evolves, it is also useful to be able to see the trends over weeks, months, and years; when you look back in time, you don’t really need the same level of detail as you do for the project’s current state. To save space and improve overall performance, the Database Cleaner deletes some rows in the database. Here is the default configuration:

  • Audit logs (available starting in Enterprise Edition) are deleted monthly.

  • For each project:

    • Only one snapshot per day is kept after 1 day. Snapshots marked by an event are not deleted.

    • Only one snapshot per week is kept after 1 month. Snapshots marked by an event are not deleted.

    • Only one snapshot per month is kept after 1 year. Snapshots marked by an event are not deleted.

    • Only snapshots with version events are kept after 2 years. Snapshots without events or with only other event types are deleted.

    • All snapshots older than 5 years are deleted, including snapshots marked by an event.

  • All closed issues more than 30 days old are deleted

  • History at package/directory level is removed

These settings can be changed at Administration > General > Housekeeping.

Last updated

Was this helpful?