gitea creates repo archives when a repo is download as a zip/tar.gz. these can take up a large amount of disk space, and contain no unique data.
on my new and mostly empty gitea instance:
$ compsize ./
Processed 3985 files, 10980 regular extents (10986 refs), 1166 inline.
Type Perc Disk Usage Uncompressed Referenced
TOTAL 100% 6.8G 6.8G 6.8G
none 100% 6.8G 6.8G 6.7G
prealloc 100% 91M 91M 88M
$ compsize ./gitea/gitea/repo-archive/
Processed 2172 files, 2188 regular extents (2188 refs), 1 inline.
Type Perc Disk Usage Uncompressed Referenced
TOTAL 100% 6.1G 6.1G 6.1G
none 100% 6.1G 6.1G 6.1G
if you have a btrfs snapshot policy like i do
(btrbk taking a snapshot every 5 minutes)
having these included in your snapshots is undesirable
as they balloon the size of your snapshots with unimportant data.
prevent this by making repo-archives its own btrfs subvolume,
which excludes it from the snapshots (unless specified specifically):
$ btrfs subvol cr ./gitea/gitea/repo-archive
there is a "Delete all repositories' archives (ZIP, TAR.GZ, etc..)" cronjob you can configure within gitea, but running this often won't prevent them from ending up in snapshots. i'd also rather keep them around while i have the disk space for them so they don't need to be re-generated as often.