podman system prune: Reclaim Disk on Runners
podman system prune deletes unused containers, images, networks, and build cache to free disk space.
Self-hosted runners run out of disk from accumulated layers. podman system prune is the broad-brush cleanup; mind that -a and --volumes are aggressive.
What it does
podman system prune removes stopped containers, dangling images, unused networks, and build cache. With -a it also removes all unused images (not just dangling); with --volumes it removes unused volumes too. It prompts unless you pass -f.
Common usage
podman system prune -f
podman system prune -a -f
podman system prune -a --volumes -f
podman image prune -f # images onlyOptions
| Flag | What it does |
|---|---|
| -a, --all | Also remove all unused images, not just dangling |
| --volumes | Also remove unused volumes |
| -f, --force | Do not prompt for confirmation |
| --filter <f> | Restrict by filter, e.g. until=24h |
In CI
On ephemeral runners prune is unnecessary. On persistent self-hosted runners, run podman system prune -f between jobs to reclaim space. Be careful with --volumes: it deletes data volumes that another job might still need.
Common errors in CI
Prune may report it cannot remove an image "in use by a container" if a container still references it; remove containers first or use podman rm -a before pruning. Running prune as the wrong user only cleans that user store (the rootless-vs-root split), so disk may still look full under the other account. --volumes removing a needed volume shows up later as missing data, not as an error.