repository size never changes

I just wanted to ask why the repository size is still the same (1.8 GB) even after we removed a lot of large files which are of size 600 MB or even larger.
We have deleted all unused branches as well.
The actual code size without large files that were removed is about 24MB.
Please advice if there is any way to reduce the size of the repository.

1 answer

0 votes

Hi Dina! Sometimes it takes some time for the garbage collection to run in the remote, so that's the reason why you won't see any changes in size. I've checked your Bitbucket Cloud account but I couldn't find any repos there. If you let me know the affected username and repo name I can run a garbage collection for you.

Looking forward to your response!



Hello Ana ,

Thank you for your response you can check the repo from here


and the user name is DinaHussieny



Dina Hussieny

Hello Ana,

I am waiting your response hope to hear from you the soonest.


Dina Hussieny

Hi Ana & Dina

I am facing a simular issue. My repository reached 1.9GB so I followed the instructions here:

I did it in two steps. First I managed to reduce it to 1.4GB. That's at least what I could see locally using the commands 

git count-objects -v 


du -hs .git/objects

But strangely enough, when looking at the repository size on the Bitbucket website, I see double size: 2.8GB!!!

Then in a second step I managed to reduce the size locally to 600MB. I tried to push and it failed because it says I exceeded 2GB.

What should I do here ? Wait for Bitbucket to do its garbage collection and try again, or is there something more serious here ?
The repository name is

But it is a private repo.

It is kind of urgent because we are stuck now, unable to push anything. Thanks!


Hello Ana,


When will you be available to supporting us in solving this issue ?

Hi @Dina Husseiny, we've run a gc on the remote repo and the size is ~1.8GB, the output is:

$ git count-objects -Hv 
count: 0
size: 0 bytes
in-pack: 39645 packs: 1
size-pack: 1.76 GiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes

You mentioned in your initial comment that the size of your local repo is now 24 MB, can you try now pushing that one so everything you removed locally will be reflected in the remote? The instructions can be found at Reduce repository size.

Let us know if you have any questions!



Hi @Michael Boccara, after running a git gc on your repo, it's now showing a size of ~1.3GB , this is the output:

$ git count-objects -Hv 
count: 0
size: 0
bytes in-pack: 72637
packs: 1
size-pack: 1.33 GiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes

Can you try pushing now the reduced repository? If you need any further assistance, let us know :)



Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

274 views 0 12
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you