podman-image-prune(1)
β¨ NAME β¨
okay so this is podman-image-prune(1) from the General Commands Manual, and it's literally the page for podman-image-prune β the command that removes all unused images from the local store π
πΈ SYNOPSIS πΈ
podman image prune [options]
π¦ DESCRIPTION π¦
podman image prune deletes all dangling images from local storage. If you pass the all option, it deletes every unused image too β like, images that are not in use by any container π
heads up bestie: the image prune command does not prune cache images that only use layers which are necessary for other images. no cap, that's the rule π
π OPTIONS π
--all,-aβ remove dangling images and images that have no associated containers.--build-cacheβ remove persistent build cache created for--mount=type=cache.--externalβ remove images even when they are used by external containers (e.g., build containers).--filter=filtersβ provide filter values. if there is more than one filter, the--filteroption should be passed multiple times:--filter label=test --filter until=10m. supported filters:labelβ only remove images with the specified labels (or without them, in the caselabel!=[...]is used).untilβ only remove images created before the given timestamp. thelabelfilter accepts two formats. one islabel=keyorlabel=key=value, which removes containers with the specified labels. the other format islabel!=keyorlabel!=key=value, which removes containers without the specified labels. theuntilfilter can be Unix timestamps, date formatted timestamps or Go duration strings (e.g.10m,1h30m) computed relative to the machine's time β°
--force,-fβ do not provide an interactive prompt for container removal. (yes that's the wording, keep it moving π)--help,-hβ print usage statement.
π EXAMPLES π
first up, remove all dangling images from local storage:
$ sudo podman image prune
WARNING! This will remove all dangling images.
Are you sure you want to continue? [y/N] y
f3e20dc537fb04cb51672a5cb6fdf2292e61d411315549391a0d1f64e4e3097e
324a7a3b2e0135f4226ffdd473e4099fd9e477a74230cdc35de69e84c0f9d907
remove all unused images from local storage without confirming β yes, zero y/N energy:
$ sudo podman image prune -a -f
f3e20dc537fb04cb51672a5cb6fdf2292e61d411315549391a0d1f64e4e3097e
324a7a3b2e0135f4226ffdd473e4099fd9e477a74230cdc35de69e84c0f9d907
6125002719feb1ddf3030acab1df6156da7ce0e78e571e9b6e9c250424d6220c
91e732da5657264c6f4641b8d0c4001c218ae6c1adb9dcef33ad00cafd37d8b6
e4e5109420323221f170627c138817770fb64832da7d8fe2babd863148287fca
77a57fa8285e9656dbb7b23d9efa837a106957409ddd702f995605af27a45ebe
remove all unused images from local storage since given time/hours:
$ sudo podman image prune -a --filter until=2019-11-14T06:15:42.937792374Z
WARNING! This will remove all dangling images.
Are you sure you want to continue? [y/N] y
e813d2135f17fadeffeea8159a34cfdd4c30b98d8111364b913a91fd930643e9
5e6572320437022e2746467ddf5b3561bf06e099e8e6361df27e0b2a7ed0b17b
58fda2abf5042b35dfe04e5f8ee458a3cc26375bf309efb42c078b551a2055c7
6d2bd30fe924d3414b64bd3920760617e6ced872364bc3bc6959a623252da002
33d1c829be64a1e1d379caf4feec1f05a892c3ef7aa82c0be53d3c08a96c59c5
f9f0a8a58c9e02a2b3250b88cc5c95b1e10245ca2c4161d19376580aaa90f55c
1ef14d5ede80db78978b25ad677fd3e897a578c3af614e1fda608d40c8809707
45e1482040e441a521953a6da2eca9bafc769e15667a07c23720d6e0cafc3ab2
$ sudo podman image prune -f --filter until=10h
f3e20dc537fb04cb51672a5cb6fdf2292e61d411315549391a0d1f64e4e3097e
324a7a3b2e0135f4226ffdd473e4099fd9e477a74230cdc35de69e84c0f9d907
remove all unused images from local storage with label version 1.0:
$ sudo podman image prune -a -f --filter label=version=1.0
e813d2135f17fadeffeea8159a34cfdd4c30b98d8111364b913a91fd930643e9
5e6572320437022e2746467ddf5b3561bf06e099e8e6361df27e0b2a7ed0b17b
58fda2abf5042b35dfe04e5f8ee458a3cc26375bf309efb42c078b551a2055c7
6d2bd30fe924d3414b64bd3920760617e6ced872364bc3bc6959a623252da002
33d1c829be64a1e1d379caf4feec1f05a892c3ef7aa82c0be53d3c08a96c59c5
f9f0a8a58c9e02a2b3250b88cc5c95b1e10245ca2c4161d19376580aaa90f55c
1ef14d5ede80db78978b25ad677fd3e897a578c3af614e1fda608d40c8809707
45e1482040e441a521953a6da2eca9bafc769e15667a07c23720d6e0cafc3ab2
π SEE ALSO π
π HISTORY π
December 2018 β originally compiled by Brent Baude (bbaude at redhat dot com).
December 2020 β filter information converted from docs.docker.com documentation by Dan Walsh (dwalsh at redhat dot com).
okay bye bestie π«Ά this was podman-image-prune(1) from the General Commands Manual, and the date tea from the history is December 2018 + December 2020 β¨π
π¦ where this page comes from
- arch rolling: podman-docker 6.1.4-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms