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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Deleted large jar files to reduce repository size Edited

Hi team,

 I have used the below set of commands to remove the .jar files to reduce the size, all the steps went fine. Even then repo still showing "remote: WARNING Repository size in Bitbucket is currently 1.5 GB"

1. java -jar bfg.jar --strip-blobs-bigger-than 10M <repo-name>

   Report is good. Has all the jars more than 10 MB for delete

2. git reflog expire --expire=now --all && git gc --prune=now --aggressive

3. git push

After steps i see the size of the repo reduced to 400 MB or so but the cloud URL still showing aroung 1.49GB Size

Here is the output of git count-objects -Hv

count: 0
size: 0 bytes
in-pack: 9763
packs: 1
size-pack: 10.60 MiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes

   Could you please let us know what is missing here 

2 answers

2 accepted

0 votes
Answer accepted

Hello @naresh aalthi ,

Welcome to the Community!

Bitbucket may take some time to reflect a change to your repository size because some objects are not removed immediately. Git has a concept of garbage collection.

Garbage collection is triggered when you push commits to your repository, however it doesn't happen on every push because GC is potentially quite expensive operation, especially when the repository becomes large. Our Git configuration has some heuristics around when and what kind of GC to trigger (it has several levels of "aggressiveness").

That's why our documentation on reducing repository size suggests to reach out to our Support team in case you can't make changes to your repository anymore due to hitting the limit. In other cases Bitbucket will eventually trigger GC and collect all dangling objects in your repository, if you keep working on the repository.

You didn't mention which repository you removed jars from, so I tried to guess one and kicked off GC for it.

Hope this helps. Let me know if you have any questions.


0 votes
Answer accepted

Hi Daniil,

   Thanks for the quick update. The repo is VirginVoyages/bigdata-real-time

    After removing jar files, we now see the size of the project went down to 10MB , can you confirm that size?

   I have raised support ticket to run the GC from the server side. 



Yes, that was one of the repositories I triggered GC for, and it reduced down to 8.6 Mb.

This is exactly what our Support team would do on your request, so you can close your case now.


Yes I see repo came down to 8.6 Mb. Thanks 

You can close the case

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,886 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you