podman-volume-prune(1)
πΈ NAME πΈ
podman-volume-prune β Remove unused volumes. This is the podman-volume-prune(1) page from the General Commands Manual, bestie, and it's literally all about cleaning up volumes you're not using π
β¨ SYNOPSIS β¨
podman volume prune [options]
π DESCRIPTION π
Okay so podman volume prune removes unused volumes. By default, only anonymous (unnamed) unused volumes are removed. Anonymous volumes are those created with a container (e.g. podman run -v /path without a volume name). Use --all (or -a) to remove all unused volumes, including named ones.
The --filter flag can be used to restrict which volumes are considered. Users are prompted to confirm removal unless --force is used.
π OPTIONS π
--all,-aβ Remove all unused volumes (anonymous and named). Without this option, only anonymous unused volumes are removed.--allcan be combined with--filter:--allwidens the set of candidate volumes to all unused ones, and the filters then restrict which of those are removed. For example,--all --filter label!=keepremoves every unused volume that does not have thekeeplabel.--dry-runβ Show which volumes would be pruned without removing them.--filterβ Provide filter values. If there is more than one filter, the--filteroption should be passed multiple times:--filter label=test --filter until=10m. Filters with the same key work inclusive, with the only exception beinglabel, which is exclusive. Filters with different keys always work exclusive. Supported filters:allβ[Bool]Whentrue, remove all unused volumes (same as--all). Whenfalseor unset, only anonymous volumes are considered.anonymousβ[Bool]Only remove volumes that are anonymous (true) or named (false).labelβ[String]Only remove volumes with the specified labels β or without them, whenlabel!=[...]is used.label!β[String]Only remove volumes without the specified labels.untilβ[DateTime]Only remove volumes created before given timestamp.after/sinceβ[Volume]Filter by volumes created after the givenVOLUME(name or tag).
The label filter accepts two formats. One is the label=key or label=key=value, which removes volumes with the specified labels. The other format is the label!=key or label!=key=value, which removes volumes without the specified labels.
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 prompt for confirmation.--helpβ Print usage statement
π¦ EXAMPLES π¦
Prune only anonymous unused volumes (default).
$ podman volume prune
Prune only anonymous unused volumes without confirmation.
$ podman volume prune --force
Prune all unused volumes (anonymous and named).
$ podman volume prune --all --force
Prune all unused volumes except those with a specific label (combine --all with a filter).
$ podman volume prune --all --force --filter label!=keep
Prune all unused volumes using the filter (equivalent to --all).
$ podman volume prune --filter all=true --force
Prune unused volumes that have the specified label.
$ podman volume prune --filter label=mylabel=mylabelvalue
Prune unused volumes that do NOT have a specific label key/value:
$ podman volume prune --filter label!=mylabel=mylabelvalue
Prune unused volumes that have a specific label key (regardless of value):
$ podman volume prune --filter label=environment
Prune unused volumes that do NOT have a specific label key:
$ podman volume prune --filter label!=environment
Preview all unused volumes without removing them.
$ podman volume prune --all --dry-run
π SEE ALSO π
π HISTORY π
November 2018, Originally compiled by Urvashi Mohnani umohnani@redhat.com β¨mailto:umohnani@redhat.comβ©.
Okay bestie, thatβs the whole podman-volume-prune(1) page from the General Commands Manual π The footer line here is just podman-volume-prune(1) β no extra source/version/date info in this original, so consider that the cute sign-off, periodt β¨
π¦ 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