podman-container-prune(1)
okay so bestie π, welcome to podman-container-prune(1) β straight outta the General Commands Manual β aka the page for podman-container-prune, the command that removes all stopped containers from local storage. The way this page is giving βcleanup eraβ is so real. β¨
πΈ NAME πΈ
podman-container-prune β Remove all stopped containers from local storage.
No cap, thatβs the whole name. π
π¦ SYNOPSIS π¦
podman container prune [options]
Thatβs the whole summoning ritual, bestie. π«Ά
π DESCRIPTION π
podman container prune removes all stopped containers from local storage.
If itβs stopped, itβs getting swept. Periodt. π§Ήβ¨
π OPTIONS π
--filter=filtersβ Provide filter values.
If there is more than one filter, the --filter option should be passed multiple times: --filter label=test --filter until=10m.
Supported filters:
annotationβ Only remove containers with (or without, whenannotation!=[...]is used) the specified annotations.labelβ Only remove containers with (or without, whenlabel!=[...]is used) the specified labels.untilβ Only remove containers created before the given timestamp.
The label filter accepts two formats. One is the label=key or label=key=value, which removes containers with the specified labels. The other format is the label!=key or label!=key=value, which removes containers without the specified labels. The annotation and annotation! filters work the same way for container annotations.
NOTE π:label!filters are combined with AND, so that the behavior is consistent withlabel, while in Docker, they are combined with OR.
The until filter 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. The default isfalse.-h,--helpβ Print usage statement. The default isfalse.
π EXAMPLES π
Remove all stopped containers from local storage:
$ podman container prune
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
878392adf2e6c5c9bb1fc19b69d37d2e98c8abf9d539c0bce4b15b46bbcce471
37664467fbe3618bf9479c34393ac29c02696675addf1750f9e346581636cde7
ed0c6468b8e1cb641b4621d1fe30cb477e1fefc5c0bceb66feaf2f7cb50e5962
6ac6c8f0067b7a4682e6b8e18902665b57d1a0e07e885d9abcd382232a543ccd
fff1c5b6c3631746055ec40598ce8ecaa4b82aef122f9e3a85b03b55c0d06c23
602d343cd47e7cb3dfc808282a9900a3e4555747787ec6723bb68cedab8384d5
Remove all stopped containers from local storage without confirmation:
$ podman container prune -f
878392adf2e6c5c9bb1fc19b69d37d2e98c8abf9d539c0bce4b15b46bbcce471
37664467fbe3618bf9479c34393ac29c02696675addf1750f9e346581636cde7
ed0c6468b8e1cb641b4621d1fe30cb477e1fefc5c0bceb66feaf2f7cb50e5962
6ac6c8f0067b7a4682e6b8e18902665b57d1a0e07e885d9abcd382232a543ccd
fff1c5b6c3631746055ec40598ce8ecaa4b82aef122f9e3a85b03b55c0d06c23
602d343cd47e7cb3dfc808282a9900a3e4555747787ec6723bb68cedab8384d5
Remove all stopped containers from local storage created before the last 10 minutes:
$ podman container prune --filter until="10m"
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
3d366295e33d8cc612c4d873199bacadd55088d90d17dcafaa9a2d317ad50b4e
π SEE ALSO π
π¦ HISTORY π¦
December 2018, Originally compiled by Brent Baudebbaude@redhat.comβ¨mailto:bbaude@redhat.comβ©December 2020, converted filter information fromdocs.docker.comdocumentation by Dan Walshdwalsh@redhat.comβ¨mailto:dwalsh@redhat.comβ©
Later, bestie π β this footer moment is podman-container-prune(1), with history dates December 2018 and December 2020 folded in all cute. Love that for us. π«Ά
π¦ where this page comes from
- arch rolling: podman 6.1.4-1 Β· Apache-2.0
- centos-stream 10: podman 7:6.1.0-2.el10 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- nixpkgs unstable: podman 6.1.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms