Forums

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

Repo size: remains the same after deleting large files

Alan Adair
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!
September 10, 2025

Hi,

repo cuOnboard

We mistakenly had node_modules  folder added to this repo and folder is large.  I added the folder to .gitignore to prevent further or new branches adding this to the repo.

 

We purged the node_modules from all history by doing the following:

git clone --mirror git@bitbucket.org:your-workspace/your-repo.git
cd your-repo.git

bfg --delete-folders node_modules

 

git reflog expire --expire=now --all
git gc --prune=now --aggressive
git push --force

 

We did this over 30 days ago and the space has still not been freed up: repo size 172MB

 

Would it be possible to run a garbage collection on them to free up the space?

1 answer

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 11, 2025

Hey @Alan Adair 

Welcome to the community!

I've I looked into this and found that the large files you previously uploaded were cached with a PR. When this happens, if the files are removed, the cache remains. The simplest solution is to perform a bare clone locally, delete the repository, then create a new one and push it back to the remote. This process will allow the repository to start fresh without the PR cache.

I hope this helps.

Regards,
Syahrul

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