Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Deleted branches and my bitbucket repositou still over 4GB. What can I do?

michal moshe
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 23, 2022

After deleting branches, we see no reduction in our repo size? I read that we should run garbage collection, but not sure how, as we can't push changes to the remote repository at all.
Please help!

2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 24, 2022

Hi @michal moshe and welcome to the community.

I checked the repositories your Bitbucket Cloud account has access to, I found one repo over the 4 GB limit and I ran a git gc on it.

Its size has been reduced to 1.5 GB, so you should be able to push to the repo now.

In case you would like to further reduce the repo's size, you can check this post of mine in a different question with more details:

If you decide to proceed with the steps mentioned in that post and rewrite history in the repo with BFG, please keep in mind that the repo's size will get increased again once you push these changes. The repo will then need another git gc for the old commits (prior to history rewrite) to get removed and for the repo's size to get reduced.

You can either let me know here, and I can run another git gc for the repo, or alternatively, since you're on a paid billing plan, you can create a ticket with Bitbucket Cloud support team. You can create a ticket via, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product.

Users cannot run a garbage collection on their remote repos at the moment, this is something support can do. We have a feature request for allowing users to do it themselves:

If you have any questions, please feel free to let me know.

Kind regards,

0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 24, 2022

Hi @michal moshe ,

welcome to the Atlassian community!

Here an useful article about how to maintain your repo and manage size

Hope this helps,


Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events