Hello,
I am using SonarQube 9.9 LTS.
Looking to clean old projects that are no longer being scanned, we noticed that there are branches that have not been deleted. Would these old branches, such as PR and others, only be gone if a new scan occurs?
Currently we cannot remove the entire project because of audit rules, but we would like to delete those unused branches, in bulk preferably.
Is there a way to force a background execution to delete these old branches or some maintenance routine that does it?
That’s correct. The cleanup only occurs when the project has a new scan. You’ll have to manually do the cleanup if you want to delete the old branches, or use the Web API (some combination of GET API/projects/search and GET API/project_branches/list would do the trick to identify the branches to erase with POST API/project_branches/delete).
The Web API documentation is always available in the footer of your instance.