How to prune old branches?

It doesn’t matter how clunky the method, all I need is to prune old branches. Some builds have leaked credentials, and even though everything has been rotated since, there is no way of cleaning old builds. Would unfollowing & re-adding the GitHub repository work?

Hello @gerhard,
Please create a support ticket directly for this issue. We will be happy to assist.

Hi Kyle,

Thank you, I managed to figure it out.

I had to delete the branch via GitHub, so that it would be removed from CircleCi. A branch that no longer existed had to be created first and then deleted via GitHub. I am used to deleting branches via git push origin :branch-to-delete, but this will leave orphaned branches in CircleCI.

Even though an API endpoint would be nice to manually delete branches, the current approach works, so I’m good, please feel free to close this topic.

1 Like