Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Unable to delete a file

My repository has exceeded the size limit. I've tried to delete some larger files to free up room, however, I am unable to delete remove files from my repository. The ways I've tried to delete the files are:


  • Navigating to the files in bitbucket, click the ellipses, selecting delete
    • results in the "something went wrong" error
  • Navigating to the files in bitbucket, click the ellipses, selecting Annotate, selecting edit dropdown, selecting delete
    • results in the "something went wrong" error
  • Removing the files from my local repository, committing, and trying to push
    • results in an error message saying I cannot commit because the remote repository is too big


Any support would be appreciated.

1 answer

1 accepted

0 votes
Answer accepted

Hi @blacaze ,

I can see one repository over the 2 GB limit from the ones that you have access to.

I ran a git gc on it, however its size has not been reduced.

Committing file deletions will not work in this case, as this will not remove the files from the repo's history and it will not have any effect on the size.

Did the size of this repo increase as a result of one large commit?
E.g. did you accidentally push some large files that you didn't want to be in the repo?
Or do you version in the repo binary/large files throughout its history?

There are two options here:

1. If the repo's size increased because of one large commit, then:

  • You can rewind (reset) the branch this commit belongs to, to the commit before the bad one
  • Go to your account's Labs settings in and enable the feature Delete dangling commits when over size limit
  • Afterwards, push this change. A git gc should get triggered automatically.

This process is explained here:

When the repo's size is over 2 GB, the only thing that can be pushed is a git reset before the commit that made the repo go over 2 GB. No new commits can be pushed, even if it's commits with file deletions.

2. The second option, if the repo has large files throughout its whole history, would be to rewrite history and

a. either remove any large files that do not need to be versioned, see:
b. or, if any large files need to be versioned, move them to Git LFS:

You will need support's assistance in this case, to temporarily increase the repo size limit so you can push.

You can open a support ticket via, in "What can we help you with" select "Technical issues and bugs" and then Bitbucket Cloud as product. In "What is the impact to your business?" make sure to select "Level 1" since the repo is over 2 GB and you are blocked.

If you have any questions, please feel free to let me know.

Kind regards,

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,821 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you