Forums

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

Need to run garbage collection on the repository

ValdikSS March 27, 2025

Hello, I just received "Your workspace is over 1 GB" email, which states that I need to clean my workspace to continue using free plan.

My repository <redacted> updates the information twice a day, using Pipelines, rewriting the history. Its size is no more than 50 MB, however the repository statistics page states it's occupying 1.7 GB of workspace size.

Please run GC on this repository, and tell what could be done to trigger the GC automatically in the future.

3 answers

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 28, 2025

Hi @ValdikSS and welcome to the community!

I ran a git gc on the repo and its size has been reduced. Does it look ok now on your end?

A git gc is triggered automatically on every push, but with different parameters every time depending on many different conditions. If the automated one doesn't reduce your repo size, you can create a question in community and either myself or one of my colleagues will run a git gc manually that will optimize the repo size better.

Just a heads up, I edited the repo URL for privacy reasons.

Kind regards,
Theodora

ValdikSS March 28, 2025

Thanks, that worked!

0 votes
ValdikSS April 29, 2025

1 month later, the repository is 591.82 MB again.

@Theodora Boudale@Mikael Sandberg  is anything could be done?

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 30, 2025

Hey @ValdikSS 

Please allow me to chip in. I have manually triggered GC to reduce the repository size.

There are several reasons why a repository's size may increase. Generally, if you have recently made numerous changes or added new items to the repository (being active), this can lead to an increase in size over time due to the accumulation of blob and tree objects. Running garbage collection (GC) can help clean this up. Hope this helps.

Regards,
Syahrul

ValdikSS May 1, 2025

Yes, I understand.

I have a CI pipeline which runs daily on schedule, and updates the files in the repository by rewriting the top commit and force-pushing. Over the course of month, the repo could become 500+ MB.

For some reason, in this scenario Bitbucket does not run git gc, at least not that frequently.

Could you tune anything from your side, or should I write here every month to run the gc manually?

0 votes
Mikael Sandberg
Community Champion
March 27, 2025

Hi @ValdikSS,

Welcome to Atlassian Community!

I have notified the Atlassian support team that is on here and they should get back to you within 2 business days. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events