CI cleans up after itself whatever a run's outcome: green (passed), orange (cancelled, skipped, superseded in the concurrency group) and red (failed). Today a job's container and network are removed when it ends, but the rest stays, run after run:
Litter
Where
Cleanup
Docker images and BuildKit cache (old runner images, pulled tags, layers) -- the largest
the server's Docker
weekly cron: docker image prune -af --filter "until=168h" and docker builder prune -af --filter "until=168h" (an image in use is kept)
Old lithosananke-runner versions (72b6cf370db1 is already obsolete)
Gitea's package registry
Settings, Packages, Cleanup rules: container, lithosananke-runner, keep the newest 2 (one to roll back to)
Run artifacts (logs, images) of every run
Gitea
[actions] ARTIFACT_RETENTION_DAYS = 14 in app.ini: what matters is committed or in Nexus
Nightly snapshots, ~60 MB a night
Nexus starshipos-snapshots
a cleanup policy (keep 7 days) and the scheduled "Compact blob store" task, which frees the disk; starshipos-releases untouched
Run logs
Gitea
small: the default retention (a year) stands
Every rule applies to green, orange and red runs alike: none is exempt because it passed, and none is kept forever because it failed. A red run's evidence lives as long as any other's (14 days of artifacts, a year of logs); anything worth keeping longer is committed (logs/) or filed with the issue it belongs to.
Why -- the ruling or the design it comes from
Captain Bob, 2026-11-07: "Will the CI clean up its litter when it's finished?" -- "Add an issue to clean up litter with both green builds, orange builds and red builds." The server has 3.8 GiB of memory and a disk shared by both wikis, Gitea, Nexus and CI; the runner-image rebuilds and the nightlies grow it every day.
Done when
The weekly Docker prune runs on the server (cron), and docker system df shows it reclaiming
Gitea's cleanup rule keeps the newest 2 lithosananke-runner versions, never the one the workflows name
ARTIFACT_RETENTION_DAYS = 14 in Gitea's app.ini
Nexus: the snapshot cleanup policy and the blob-store compaction scheduled
Verified after a week: a green, an orange and a red run's artifacts and images gone on schedule; disk use flat
Area
CI, the server
Priority
must -- high: Captain Bob, 2026-11-07, "Given my current server constraints, this is a high priority item"
### What
CI cleans up after itself **whatever a run's outcome**: green (passed), orange (cancelled, skipped, superseded in the concurrency group) and red (failed). Today a job's container and network are removed when it ends, but the rest stays, run after run:
| Litter | Where | Cleanup |
|---|---|---|
| Docker images and BuildKit cache (old runner images, pulled tags, layers) -- the largest | the server's Docker | weekly cron: `docker image prune -af --filter "until=168h"` and `docker builder prune -af --filter "until=168h"` (an image in use is kept) |
| Old `lithosananke-runner` versions (`72b6cf370db1` is already obsolete) | Gitea's package registry | Settings, Packages, Cleanup rules: container, `lithosananke-runner`, keep the newest 2 (one to roll back to) |
| Run artifacts (logs, images) of every run | Gitea | `[actions] ARTIFACT_RETENTION_DAYS = 14` in `app.ini`: what matters is committed or in Nexus |
| Nightly snapshots, ~60 MB a night | Nexus `starshipos-snapshots` | a cleanup policy (keep 7 days) and the scheduled "Compact blob store" task, which frees the disk; `starshipos-releases` untouched |
| Run logs | Gitea | small: the default retention (a year) stands |
Every rule applies to green, orange and red runs alike: none is exempt because it passed, and none is kept forever because it failed. A red run's evidence lives as long as any other's (14 days of artifacts, a year of logs); anything worth keeping longer is committed (`logs/`) or filed with the issue it belongs to.
### Why -- the ruling or the design it comes from
Captain Bob, 2026-11-07: "Will the CI clean up its litter when it's finished?" -- "Add an issue to clean up litter with both green builds, orange builds and red builds." The server has 3.8 GiB of memory and a disk shared by both wikis, Gitea, Nexus and CI; the runner-image rebuilds and the nightlies grow it every day.
### Done when
- [ ] The weekly Docker prune runs on the server (cron), and `docker system df` shows it reclaiming
- [ ] Gitea's cleanup rule keeps the newest 2 `lithosananke-runner` versions, never the one the workflows name
- [ ] `ARTIFACT_RETENTION_DAYS = 14` in Gitea's `app.ini`
- [ ] Nexus: the snapshot cleanup policy and the blob-store compaction scheduled
- [ ] Verified after a week: a green, an orange and a red run's artifacts and images gone on schedule; disk use flat
### Area
CI, the server
### Priority
must -- high: Captain Bob, 2026-11-07, "Given my current server constraints, this is a high priority item"
🤖 Filed with [Claude Code](https://claude.com/claude-code)
Weekly Docker prune: Sundays 03:00, logged to /var/log/docker-prune.log
Gitea artifact retention: 30 days (set by environment variable; this issue said 14)
Gitea package cleanup: a script, Sundays 03:15, logged to /var/log/gitea-cleanup.log, in place of a UI cleanup rule
Left: Nexus. 3.96 Community has no public cleanup-policy API, and the restricted account snapshot-admin gets 403 on the internal one. So in the UI: a cleanup policy (maven2, component age over 7 days) on starshipos-snapshots, applied by the existing nightly "Cleanup service" task (01:00); and a weekly "Admin - Compact blob store" task on the default blob store (Sunday 03:30). Then the week-later check.
Done on the server (Captain Bob, 2026-11-07):
- Weekly Docker prune: Sundays 03:00, logged to `/var/log/docker-prune.log`
- Gitea artifact retention: **30 days** (set by environment variable; this issue said 14)
- Gitea package cleanup: a script, Sundays 03:15, logged to `/var/log/gitea-cleanup.log`, in place of a UI cleanup rule
Left: Nexus. 3.96 Community has no public cleanup-policy API, and the restricted account `snapshot-admin` gets 403 on the internal one. So in the UI: a cleanup policy (`maven2`, component age over 7 days) on `starshipos-snapshots`, applied by the existing nightly "Cleanup service" task (01:00); and a weekly "Admin - Compact blob store" task on the `default` blob store (Sunday 03:30). Then the week-later check.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
CI cleans up after itself whatever a run's outcome: green (passed), orange (cancelled, skipped, superseded in the concurrency group) and red (failed). Today a job's container and network are removed when it ends, but the rest stays, run after run:
docker image prune -af --filter "until=168h"anddocker builder prune -af --filter "until=168h"(an image in use is kept)lithosananke-runnerversions (72b6cf370db1is already obsolete)lithosananke-runner, keep the newest 2 (one to roll back to)[actions] ARTIFACT_RETENTION_DAYS = 14inapp.ini: what matters is committed or in Nexusstarshipos-snapshotsstarshipos-releasesuntouchedEvery rule applies to green, orange and red runs alike: none is exempt because it passed, and none is kept forever because it failed. A red run's evidence lives as long as any other's (14 days of artifacts, a year of logs); anything worth keeping longer is committed (
logs/) or filed with the issue it belongs to.Why -- the ruling or the design it comes from
Captain Bob, 2026-11-07: "Will the CI clean up its litter when it's finished?" -- "Add an issue to clean up litter with both green builds, orange builds and red builds." The server has 3.8 GiB of memory and a disk shared by both wikis, Gitea, Nexus and CI; the runner-image rebuilds and the nightlies grow it every day.
Done when
docker system dfshows it reclaiminglithosananke-runnerversions, never the one the workflows nameARTIFACT_RETENTION_DAYS = 14in Gitea'sapp.iniArea
CI, the server
Priority
must -- high: Captain Bob, 2026-11-07, "Given my current server constraints, this is a high priority item"
🤖 Filed with Claude Code
Done on the server (Captain Bob, 2026-11-07):
/var/log/docker-prune.log/var/log/gitea-cleanup.log, in place of a UI cleanup ruleLeft: Nexus. 3.96 Community has no public cleanup-policy API, and the restricted account
snapshot-admingets 403 on the internal one. So in the UI: a cleanup policy (maven2, component age over 7 days) onstarshipos-snapshots, applied by the existing nightly "Cleanup service" task (01:00); and a weekly "Admin - Compact blob store" task on thedefaultblob store (Sunday 03:30). Then the week-later check.