Forums

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

How to reduce the remote repo size after deleting large files

Bob Seed
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 24, 2025

Good morning,

I've recently performed a repository cleanup using git-filter-repo to remove large files from our repository's history:

Actions Taken:
1. Created a mirror of the repository
2. Used git-filter-repo to remove specific large files and folders
3. Force pushed the cleaned repository back to Bitbucket
4. Verified the local repository size is now 460MB
5. Made a fresh clone of the remote repo to confirm this

Current Situation:
- Local repository size (verified with git count-objects): 460MB
- Bitbucket's reported repository size: 2.5GB
- The discrepancy persists even after several days
- It seems the cleanup was successful locally, but Bitbucket's size hasn't updated

Request:
Could you please:
1. Trigger a manual garbage collection on our repository
2. Verify if there are any old pack files or artifacts that need cleanup
3. Update the repository size calculation
4. Assist me with further instructions on how to reduce the remote repo size

Thanks,
Bob

1 answer

0 votes
Phil C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 24, 2025

Hi @Bob Seed,

Welcome to the community! 

I've run garbage collection on the largest repository on your workspace, and the repository size has reduced to 460.6 MB. Is this the size of the local repository?

You can check by running the following command on the local repository: 

 git count-objects -vH

The "size-pack" will show the local repository size.

Before proceeding with the next push to the remote repository, please ensure that you and all repository collaborators make a fresh clone of the remote repository to avoid reintroducing old/cleaned-up history and potentially inflating the repository size again.

I hope this helps. 

- Phil

Bob Seed
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 24, 2025

Thanks Phil, that has resolved it.

Is there a way to trigger gc on the repository?

Phil C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 25, 2025

Hi @Bob Seed 

You're welcome! We periodically run automated garbage collection on repositories. However, if you've cleaned up locally and need immediate changes, requesting garbage collection is the quickest solution.

I hope this helps. 

- Phil

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