Forums

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

How do I clean up workspace size? Which repos are too big?

makeitTim
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 15, 2025

One of my older workspaces is 1.7 GB. I'm not actively using much, but I don't want it locked. There are a couple dozen repos going back over a decade, some are C++ and Java, probably have things committed that shouldn't be. I'm sure it could be cleaned. How? All Bitbucket tells me is the overall workspace size.

How do I find the big files?

How do I clean them out?

 

Thanks for any help.

2 answers

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

Hi @makeitTim 

There is currently no feature in Bitbucket Cloud to show you all repositories by size:

In terms of figuring out what the large file sizes are, you may use this command against the large repository - it will sort the largest files to the top:

  • 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

Once you have a list of those large files, you may reduce the repository size by removing those large files or converting them to GIT LFS:

To specifically remove files above 1mb, you can make use of the same BFG tool described in the links above to do so - instructions and a sample command for this are below:

Please note that any cleanup operations create garbage/dangling commits, which will inflate the size. We need to run a server-side gc from our side to complete the process, so please let me know when you're ready to do so.


Cheers!
- Ben (Bitbucket Cloud Support)

0 votes
makeitTim
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 15, 2025

As far as I can tell, the only big files are various image assets an original .PSD image files stored in the repo. They are all over old C++, Android, and iOS projects which had mipmap raster approaches. Finding and cleaning them out doesn't look manageable?

Is there a way to move all the image assets over 1 MB to LFS? What's the approach here?

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