Forums

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

Repository size, need assistance to run gc

Tigran Asaturjan
June 18, 2026

Hello,

 

We have (one) workspace in which we have 3 repositories, one of which used to be close to 700MB. We have successfully cleaned it up, but it still shows ~650MB. Locally it says ~42MB.

Repository name ends with `*client`.

Could you please assist us on this?

Many thanks in advance.

4 answers

1 accepted

0 votes
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 22, 2026

Hi @Tigran Asaturjan 

I have attempted to reduce the size of your repository but it has ionly reduced from 673MB > 659MB. 

You have a couple of options to resolve this:

Option 1 - Delete & recreate the repositories
This is the fastest way to solve the problem, but loses metadata such as PRs, Pipelines, Permissions, etc.

  1. Perform a clone of those repositories for backup purposes

  2. Delete those repositories from your workspace to free up space and allow you to push. NOTE: This will permanently remove metadata such as PR's/pipelines/user permissions etc.

  3. Identify the largest files in your repositories by executing the following command:
    git rev-list --objects --all \
    | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \| awk '/^blob/ {print substr($0,6)}' \
    | sort -r --numeric-sort --key=2 \
    | numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest

  4. Perform cleanup operations locally to reduce the size

  5. Once complete, push those repositories back to your workspace by creating a blank repository with the same name of the deleted repository, then mirror pushing the contents of the cleaned repository:

 

HTTPS
git push --mirror https://<username>@bitbucket.org/<WorkspaceID>/<RepoName>.git
SSH
git push --mirror git@bitbucket.org:<WorkspaceID>/<RepoName>.git

NOTE: This will remove metadata such as PR's/pipelines/permissions etc but will keep your commit history and binary files intact.

Option 2 - Temporarily upgrade

  1. Upgrade to a paid plan and utilise our 30-day trial period to restore functionality and provide more time to reduce your repository directly without deletion. You can choose to continue or cease your trial before the end of the 30-day period.

  2. If you encounter any issues during this period - you may raise a ticket directly with our support team using your workspace URL: Atlassian Support  

Please let me know how this goes.

Cheers!

- Ben (Bitbucket Cloud Support)

Tigran Asaturjan
June 24, 2026

Hello, Ben. I've deleted repo and re-created a new one. Thanks.

Probably gonna need another support with rights and management.
When started to use bitbucket i created a test account for a project.
Now, after 3 years i added my original Atlassian account which I had before.
How to properly handle correct transition. Should I write a separate post?

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 24, 2026

Hi @Tigran Asaturjan 

If this is related to re-gaining access to a workspace - I'd suggest raising a ticket with our billing team by selecting "Billing, payments and pricing":

Otherwise - please clarify what the issue you're facing is currently. Please remember this is a public forum, so leave out any sensitive data.

Cheers!

- Ben (Bitbucket Cloud Support)

0 votes
Jobyzo Jobyzo
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!
June 20, 2026

The commend helped me alot thanks everyone

0 votes
Tomislav Tobijas
Community Champion
June 18, 2026

Hi @Tigran Asaturjan ,

There's an active feature request for users to be able to trigger a full git gc on cloud: BCLOUD-11593: Allow users to mark repositories for git gc (BB-13894) 
As stated in the suggestion, you can reach out to Atlassian Support and they should be able to assist you with this. 👈

Here's also an article that might help: Reduce repository size 

Generally speaking, when repo is over 75% of the limit, after you've rewritten history and force-pushed, an automatic GC may be triggered. 

Cheers,
Tobi

0 votes
Arkadiusz Wroblewski
Community Champion
June 18, 2026

Hello and welcome to Atlassian Community @Tigran Asaturjan 

I requested Assistance for you, as it probably needs Garbage collection from Backend initiated by support.

Best,

Arkadiusz 🤠 ☀️ 

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