mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Add volume prune --filter support
This change adds support for the `--filter` / `?filters` arguments on the `podman volume prune` subcommand. * Adds ParseFilterArgumentsIntoFilters helper for consistent Filter string slice handling * Adds `--filter` support to podman volume prune cli * Adds `?filters...` support to podman volume prune api * Updates apiv2 / e2e tests Closes #8672 Signed-off-by: Baron Lenardson <lenardson.baron@gmail.com>
This commit is contained in:
@ -8,7 +8,8 @@ podman\-volume\-prune - Remove all unused volumes
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
Removes all unused volumes. You will be prompted to confirm the removal of all the
|
||||
Removes unused volumes. By default all unused volumes will be removed, the **--filter** flag can
|
||||
be used to filter specific volumes. You will be prompted to confirm the removal of all the
|
||||
unused volumes. To bypass the confirmation, use the **--force** flag.
|
||||
|
||||
|
||||
@ -18,6 +19,17 @@ unused volumes. To bypass the confirmation, use the **--force** flag.
|
||||
|
||||
Do not prompt for confirmation.
|
||||
|
||||
#### **--filter**
|
||||
|
||||
Filter volumes to be pruned. Volumes can be filtered by the following attributes:
|
||||
|
||||
- dangling
|
||||
- driver
|
||||
- label
|
||||
- name
|
||||
- opt
|
||||
- scope
|
||||
|
||||
#### **--help**
|
||||
|
||||
Print usage statement
|
||||
@ -29,6 +41,8 @@ Print usage statement
|
||||
$ podman volume prune
|
||||
|
||||
$ podman volume prune --force
|
||||
|
||||
$ podman volume prune --filter label=mylabel=mylabelvalue
|
||||
```
|
||||
|
||||
## SEE ALSO
|
||||
|
Reference in New Issue
Block a user