Files
misc-scripts/.gitignore
T
admin 7739c830cb gitea-image-prune.sh: add --type, so generic packages are prunable
--all meant "all *container* packages": every API path hardcoded
type=container. admin/felhom-golden (type generic) was therefore
invisible to every mode of the script, and grew to 22 versions x
~627 MB = 13 GB — 88% of the gitea PVC — while
"--all --keep 7 --apply --reclaim" reported success against the
~1.3 GB of container images next to it.

--type defaults to container, so existing invocations are unchanged
(verified: felhom-hub still lists 9 tags with digest manifests and
a PROTECTED latest). Non-container types skip the OCI index ->
manifest -> blob indirection entirely and read sizes from the files
API, since their blobs are unique per version — which also means
apparent size IS the reclaimable size, so the shared-layer caveat
is replaced rather than repeated.

--all now warns that it covers one type only, and reclaim notes that
blobs newer than [cron.cleanup_packages] OLDER_THAN (24h) survive the
pass. Audit lines and the banner carry the type.

Sweeping both types needs two runs:
  ./gitea-image-prune.sh --all --keep 7 --apply --yes --reclaim
  ./gitea-image-prune.sh --type generic --all --keep 3 --apply --yes --reclaim

Also adds .gitignore for the logs/ directory the script writes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TzapW3g7zGnmjRrSLfqFQv
2026-08-23 13:47:58 +02:00

4 lines
158 B
Plaintext

# Audit logs written by gitea-image-prune.sh (--log overrides the location).
# Token-free by construction, but operational output — not repo content.
logs/