Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Clean Up

Brett
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!
February 24, 2025

How do we reduce the size of our repo? Filtered branches, done local clean ups, but never seems to make a difference in Repository details. How often is GC done on bitbuckets end? Is there a way to trigger it.

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 25, 2025

Hello @Brett ,

and welcome to the Community!

GC is executed from time to time based on some repository heuristics that calculate parameters such as loose objects.

I went ahead and triggered a manual GC on the biggest repository I found under the workspace you provided when posting this question. This helped to reduce ~500MB of its original size.

If you would like to reduce the size of that repository further, follow the instructions in the article Reduce Repository Size | Bitbucket Cloud.

I hope that helps! Let us know in case you have any questions.

Thank you, @Brett !

Patrik S

Brett
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!
April 15, 2025

Hey Patrik, 

Thank you for that. My repo is still sitting at around 1.3gb according to Repository details, yet local is only 13MB. Do you have any insight into this difference?

Thank you.

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 17, 2025

Hey @Brett 

Could you confirm if after cloning the repository locally and running the command below, the large files are no longer listed ?

git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
| sed -n 's/^blob //p' \
| sort --numeric-sort --key=2 \
| tail -n 30 \
| cut -c 1-12,41- \
| $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7

This should list the top 30 largest files in the repository.

If there are still large files being listed, I'd recommend using BFG tool to remove those files and then we can execute GC again on the server side.

However, if no large files are present in the output, some pull requests in that repository might still be holding the large files. If that is the case, I can raise a support ticket for you to investigate further.

Thank you, @Brett !

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events