# "Garbage collect all repositories" not having any effect

**URL:** <https://forum.gitea.com/t/garbage-collect-all-repositories-not-having-any-effect/1381>\
**Category:** General\
**Created:** [August 13, 2019, 4:51pm UTC](https://forum.gitea.com/t/garbage-collect-all-repositories-not-having-any-effect/1381 "2019-08-13T16:51:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![oscarlo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/oscarlo/32/4781_2.png) [@oscarlo](https://forum.gitea.com/u/oscarlo)\
**Post date:** [August 13, 2019, 4:51pm UTC](https://forum.gitea.com/t/garbage-collect-all-repositories-not-having-any-effect/1381/1 "2019-08-13T16:51:35Z")

</div>

Hi, all,

After having found a very large repository on our server and attempting to clean up both the repo and commit history to decrease its size, I noticed that the repo size found via the admin/repos page stayed constant despite the local repo dropping down massively.  
After figuring out it likely was due to “garbage” still being present in the remote I ran “Garbage collect all repositories”, but it has had no effect.

I also noticed that the commit where I added the rebased repo included references to the old, now removed commits, and that clicking the “Compare X commits” link causes the site to crash for a few minutes. I’m not sure if this is hints to a potential issue or if it’s caused by local customizations to the code, but that has also made me want to figure out a way to handle the problem in a manual way as the previous one didn’t seem to take.

Is there a way to manually garbage collect a repo, if I’m running a docker deployment? Can I for example access the repository via the respective volume and sort it out from there?

Cheers,  
Oscar

---

<div class="post-metadata">

**Author:** ![oscarlo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/oscarlo/32/4781_2.png) [@oscarlo](https://forum.gitea.com/u/oscarlo)\
**Post date:** [August 14, 2019, 10:54am UTC](https://forum.gitea.com/t/garbage-collect-all-repositories-not-having-any-effect/1381/2 "2019-08-14T10:54:41Z")

</div>

It appears like the actual cause of the outage was the massive memory required to handle the “commit comparison” (hypothesis based on the logs showing a `fatal error: runtime: out of memory`, and after testing and successfully completing the same action with a smaller commit history).

Question still remains how to best cleanup the remote repositories, but the next question if if it is perhaps a good idea to introduce some limitation to the comparison functionality in order to abandon those of a breaking size?
