Use filters to avoid surprises, e.g. keep images used in last 7 days:
podman image prune -a -f --filter "until=168h"
Use podman’s auto-prune via events (Podman 4.4+)
- Podman supports automatic prune on certain events via containers.conf.
- Rootless: edit ~/.config/containers/containers.conf
- Rootful: edit /etc/containers/containers.conf
[engine]
prune_images = true
prune_images_interval = "24h"
prune_images_max_age = "168h" # 7 days; remove images unused for this long
prune_images_keep = 10 # keep at least N most-recently used