Forums

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

I want to run garbage collection for my workspace

Rahul Agarwal June 6, 2025

As per changes in the free usage storage, I deleted one of my large repo. 
I want to run garbage collection for the workspace https://bitbucket.org/ra**u***u

2 answers

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 9, 2025

Hi @Rahul Agarwal

Welcome to the community.

Could you provide the repo sizes of those repositories you'd like to us to run Git GC (Garbage Collection)?

Regards,
Mark C

Rahul Agarwal June 9, 2025

Hi @Mark C
The repo blutag-navi is around 1 GB and that was deleted from the workspace

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 10, 2025

Hi @Rahul Agarwal

Thanks for letting me know.

I've also run Git GC against your largest repositories and your workspace size is now down to 994.6 MB.

Could you check the same on your end?

Regards,
Mark C

Rahul Agarwal June 11, 2025

Thank you
Can you please run for `blutag-ai-google` & `blutag-sln` as well?

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 12, 2025

Hi @Rahul Agarwal

I went ahead and run Git GC, however, only one repository has reduced the size.

177.2 MB -> 177.2 MB

176 MB -> 136.4 MB

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.

Regards,
Mark C

0 votes
Tansu Akdeniz
Community Champion
June 6, 2025

Hi @Rahul Agarwal 

Welcome to the community.

The Atlassian support team has been notified and they will reach out to you.

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