Forums

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

Request to Remove ZIP Files to Reduce Repository Size as 1GB limit is exceeded and in read-only mode

magento_extention July 1, 2025

Hi Team,

I have a few ZIP files located at a specific path in the <redacted> Bitbucket repository that I need to remove in order to reduce the workspace size below the 1 GB limit.

However, when I attempt to delete these ZIP files, I encounter the following error:

"This workspace is over the 1 GB size limit. Reduce the size of your workspace or upgrade to a Standard or Premium plan to increase the size limit. Upgrade to a Standard or Premium plan or learn how to reduce your repository size.”

Could you please help us remove these ZIP files from the repository, or assist us with the correct method to do so under the current limitations?

Thank you!

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 2, 2025

Hi @magento_extention,

Simply deleting a file from a repository is not going to remove the file from history. The file will continue to exist in older commits. The way to remove a file from history is by rewriting history. You can do this with a tool like BFG repo cleaner:

You would need to take a mirror clone of the repo, run BFG on the mirror clone to remove specific file(s), and then push the changes back to the Bitbucket repo. Detailed steps are on the page I shared. We strongly recommend taking a backup of the mirror clone before running BFG, in case anything goes wrong.

After running BFG on the mirror clone, you can use the command git count-objects -Hv (inside the mirror clone) to check the new size (sum of the fields size and size-pack in the output).

With regards to pushing the changes after BFG to Bitbucket, you can temporarily upgrade your workspace to a paid billing plan to push your changes. We provide a 30-day evaluation period and you can downgrade back to the Free plan within that 30 day period without being charged. Bitbucket Cloud will only charge your credit card at the end of the billing cycle if you don't downgrade.

With all that being said, please keep in mind the following:

  • The workspace where this repo belongs is currently consuming more than 10 GB of space. Even if you rewrite history to remove files from this repo, it won't be enough to bring the total workspace storage below 1 GB. Changes would be needed in other large repos as well. Therefore, I would recommend first making the necessary changes with BFG in all your large repos locally (as this might be time consuming), and then upgrading the billing plan to push.
  • After you push changes with BFG, the repos may need a git gc from our side for the new size to be reflected. You can leave a reply here and let me know the repo names masked (with some asterisks in their name, e.g. re*****a***bg) so I can run a git gc on them.

Just a heads up, I'll remove the repo name from your post to protect your privacy, as this is a public forum.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events