NAME¶ 名称
podman-network-prune - Remove all unused networks
podman-network-prune - 删除所有未使用的网络
SYNOPSIS¶ 概要
podman network prune [options]
podman 网络清理 [选项]
DESCRIPTION¶ 描述
Remove all unused networks. An unused network is defined by a network which
has no containers connected or configured to connect to it. It does not remove
the so-called default network which goes by the name of podman.
删除所有未使用的网络。未使用的网络被定义为没有容器连接或配置连接到它的网络。它不会删除所谓的名为 podman 的默认网络。
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 |
---|---|
label |
Only remove networks, with (or without, in the case of label!=[…] is used) the specified labels. |
until |
Only remove networks created before given timestamp. |
The label
filter accepts two formats. One is the label
=key or label
=key=value, which removes networks with the specified labels. The other format is the label!
=key or label!
=key=value, which removes networks 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
不提示确认
EXAMPLE¶ 例子 ¶
Prune networks: 修剪网络:
podman network prune
Prune all networks created not created in the last two hours:
剪除所有在过去两小时内未创建的网络:
podman network prune --filter until=2h
SEE ALSO¶ 参见 ¶
HISTORY¶ 历史 ¶
February 2021, Originally compiled by Brent Baude bbaude@redhat.com
2021 年 2 月,最初由 Brent Baude bbaude@redhat.com 编译