# Suggestion: Allow repository owners to trigger garbage collection

**URL:** <https://forum.codefloe.com/t/suggestion-allow-repository-owners-to-trigger-garbage-collection/269>\
**Category:** Site Feedback\
**Created:** [November 26, 2026, 7:46am UTC](https://forum.codefloe.com/t/suggestion-allow-repository-owners-to-trigger-garbage-collection/269 "2026-11-26T07:46:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Konveksa](https://forum.codefloe.com/letter_avatar_proxy/v4/letter/k/c37758/32.png) [@Konveksa](https://forum.codefloe.com/u/Konveksa)\
**Post date:** [November 26, 2026, 7:46am UTC](https://forum.codefloe.com/t/suggestion-allow-repository-owners-to-trigger-garbage-collection/269/1 "2026-11-26T07:46:29Z")

</div>

CodeFloe runs `[cron.git_gc_repos]` (`TIMEOUT: 900s`) with default arguments, so unreachable objects from history rewrites, force-pushes, or deleted branches stay in the bare repository for Git’s default two-week prune grace period and continue counting towards the storage quota. Users who strip large files from history have to wait two weeks, ask an admin, or recreate the repository to reclaim space.

Adding a manual `git gc` trigger in repository settings would let owners handle this directly:

- Run a timed `git gc` with a shorter prune window (or `--prune=now` behind a repository lock) to avoid racing with active pushes.
- Enforce rate limiting to prevent abuse, coordinated via the existing HA leader or a per-repository lock.

Gitea tracks a related proposal for an owner maintenance section ([#36214](https://github.com/go-gitea/gitea/issues/36214)). In the short term, a clean-up request channel for post-rewrite quota recovery would also help.

Are there specific storage or GC policies on CodeFloe that constrain this?

---

<div class="post-metadata">

**Author:** ![codefloe](https://forum.codefloe.com/user_avatar/forum.codefloe.com/codefloe/32/347_2.png) [@codefloe](https://forum.codefloe.com/u/codefloe)\
**Post date:** [November 26, 2026, 10:39am UTC](https://forum.codefloe.com/t/suggestion-allow-repository-owners-to-trigger-garbage-collection/269/2 "2026-11-26T10:39:18Z")

</div>

Thanks, good idea, and it’s on its way: [https://codefloe.com/arbinel/arbinel/pulls/325](https://codefloe.com/arbinel/arbinel/pulls/325)

One detail: Forgejo keeps a reflog for every repository, so rewritten history stays reachable for 30 days before Git’s two-week prune window even starts. A plain `git gc` wouldn’t free anything.

Repository owners will get a **Run garbage collection** button in the repository settings. It drops the reflog entries no branch or tag reaches any more, prunes the objects they kept, and updates the size counted against your quota. Objects from the last 15 minutes are kept so running pushes are safe. Each repository can run it once a day. Commits a pull request still refers to, LFS objects and forks aren’t affected.

It goes live on CodeFloe with the next release. For next time: Site feedback is the right place for CodeFloe itself, such as quotas, limits and policies. A feature for the forge software, like this one, is best opened as an issue at [https://codefloe.com/arbinel/arbinel/issues](https://codefloe.com/arbinel/arbinel/issues), where Arbinel’s features are planned and discussed.

---

<div class="post-metadata">

**Author:** ![Konveksa](https://forum.codefloe.com/letter_avatar_proxy/v4/letter/k/c37758/32.png) [@Konveksa](https://forum.codefloe.com/u/Konveksa)\
**Post date:** [November 26, 2026, 3:08pm UTC](https://forum.codefloe.com/t/suggestion-allow-repository-owners-to-trigger-garbage-collection/269/3 "2026-11-26T15:08:58Z")

</div>

Thanks for the quick turnaround! Noted on `arbinel/arbinel` for next time.
