Deleting a branch deletes source code?

  • SonarQube Version:
  • SonarQube deployment: Helm

Hello! I wanted to ask a question I couldn’t answer myself after searching the documentation. When deleting a branch from SonarQube UI, will the code from that branch also be deleted from SonarQube? I accidentaly mixed project keys which led me to upload code from an incorrect repository. To fix this, I simply deleted the branch from the UI, but I’m not sure if the code uploaded in that branch was deleted from SonarQube and its database, as I’d like to do.


Hi Rafael,

Welcome to the community!

Cleanup always happens at the end of analysis report processing. So the next time you analyze a branch (it’s possible this only happens for main branch analysis, but I think we fixed that) the remnants of that branch will be removed from the DB.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.