Skip to content
Latchkey

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

Terminal
podman system prune -f
podman system prune -a -f
podman system prune -a --volumes -f
podman image prune -f   # images only

Options

FlagWhat it does
-a, --allAlso remove all unused images, not just dangling
--volumesAlso remove unused volumes
-f, --forceDo 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.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →