NAME¶ 名称
podman-volume-prune - Remove all unused volumes
podman-volume-prune - 删除所有未使用的卷
SYNOPSIS¶ 概要
podman volume prune [options]
podman volume prune [选项]
DESCRIPTION¶ 描述
Removes unused volumes. By default all unused volumes are removed, the --filter flag can
be used to filter specific volumes. Users are prompted to confirm the removal of all the
unused volumes. To bypass the confirmation, use the --force flag.
删除未使用的卷。默认情况下会删除所有未使用的卷,可以使用 --filter 标志来过滤特定的卷。用户将被提示确认删除所有未使用的卷。要跳过确认,请使用 --force 标志。
OPTIONS¶ 选项
--filter¶
Provide filter values. 提供过滤器值。
The filters argument format is of key=value
. If there is more than one filter, then pass multiple OPTIONS: --filter foo=bar --filter bif=baz.
过滤器参数格式为 key=value
。如果有多个过滤器,则传递多个选项:--filter foo=bar --filter bif=baz。
Supported filters: 支持的过滤器:
Filter |
Description |
---|---|
dangling |
[Bool] Only remove volumes not referenced by any containers |
driver |
[String] Only remove volumes with the given driver |
label |
[String] Only remove volumes, with (or without, in the case of label!=[…] is used) the specified labels. |
name |
[String] Only remove volume with the given name |
opt |
[String] Only remove volumes created with the given options |
scope |
[String] Only remove volumes with the given scope |
until |
[DateTime] Only remove volumes created before given timestamp. |
after/since 之后/自从 |
[Volume] Filter by volumes created after the given VOLUME (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.
label
过滤器接受两种格式。一种是 label
=key 或 label
=key=value,用于删除具有指定标签的卷。另一种格式是 label!
=key 或 label!
=key=value,用于删除没有指定标签的卷。
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.
until
过滤器可以是 Unix 时间戳、日期格式化的时间戳,或者是相对于机器时间计算的 Go 时长字符串(例如 10m,1h30m)。
--force, -f¶
Do not prompt for confirmation.
不要提示确认。
--help¶ --帮助 ¶
Print usage statement 打印使用说明
EXAMPLES¶ 示例
Prune all unused volumes.
清除所有未使用的卷。
$ podman volume prune
Prune all volumes. Note: this command will also remove all containers that are using a volume.
清除所有卷。注意:此命令还将删除正在使用卷的所有容器。
$ podman volume prune --force
Prune all volumes that contain the specified label.
修剪所有包含指定标签的卷。
$ podman volume prune --filter label=mylabel=mylabelvalue
SEE ALSO¶ 参见 ¶
podman(1), podman-volume(1)
podman(1),podman-volume(1)
HISTORY¶ 历史 ¶
November 2018, Originally compiled by Urvashi Mohnani umohnani@redhat.com
2018 年 11 月,最初由 Urvashi Mohnani umohnani@redhat.com 编译