Forums

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

Request for repository cleanup after using BFG to delete files

cpedersen April 24, 2025

Hi support,

I’ve just used BFG Repo-Cleaner to permanently delete a number of large files from my repository. I’ve pushed the cleaned repository successfully and would now like to ask if you can trigger garbage collection and cleanup on your side to reflect the reduced size.

Here’s the result I get when I run git count-objects -Hv after cleanup:

count: 36103
size: 465.59 MiB
in-pack: 144798
packs: 1
size-pack: 1.41 GiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes

Thank you in advance for your help!
Best,
Camilla

1 answer

1 accepted

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

Hi Camilla,

I've executed a gc nd this has reduced the size from 3.0GB to 1.4GB.

You'll need to do further cleanup on large files in your repository - here's a command that will show you which files are large:

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

Let me know when you're ready for a subsequent garbage collection.

Cheers!

- Ben (Bitbucket Cloud Support)

cpedersen April 25, 2025

Thanks a lot and thanks for the command. The plan is to move the rest of the large files to git LFS.

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