NAME¶ 名称
podman-rmi - Remove one or more locally stored images
podman-rmi - 删除一个或多个本地存储的镜像
SYNOPSIS¶ 概要
podman rmi [options] image […]
podman rmi [选项] 镜像 […]
podman image rm [options] image […]
podman image rm [选项] 镜像 […]
DESCRIPTION¶ 描述
Removes one or more locally stored images.
Passing an argument image deletes it, along with any of its dangling parent images. A dangling image is an image without a tag and without being referenced by another image.
删除一个或多个本地存储的镜像。传递一个镜像参数将删除它,以及任何其悬空的父镜像。悬空镜像是指没有标签且没有被另一个镜像引用的镜像。
Note: To delete an image from a remote registry, use the skopeo delete command. Some registries do not allow users to delete an image via a CLI remotely.
注意:要从远程注册表中删除镜像,请使用 skopeo delete 命令。一些注册表不允许用户通过 CLI 远程删除镜像。
OPTIONS¶ 选项
--all, -a¶
Remove all images in the local storage.
删除本地存储中的所有镜像。
--force, -f¶
This option causes Podman to remove all containers that are using the image before removing the image from the system.
此选项会导致 Podman 在从系统中删除镜像之前删除使用该镜像的所有容器。
--ignore, -i¶
If a specified image does not exist in the local storage, ignore it and do not throw an error.
如果指定的镜像在本地存储中不存在,则忽略它,不会抛出错误。
--no-prune¶
This option does not remove dangling parents of the specified image.
此选项不会删除指定图像的悬空父级。
Remove an image by its short ID
通过其短 ID 删除图像
$ podman rmi c0ed59d05ff7
Remove an image and its associated containers.
删除图像及其关联的容器。
$ podman rmi --force imageID
Remove multiple images by their shortened IDs.
通过它们的缩短 ID 删除多个图像。
$ podman rmi c4dfb1609ee2 93fd78260bd1 c0ed59d05ff7
Remove all images and containers.
删除所有图像和容器。
$ podman rmi -a -f
Remove an absent image with and without the --ignore
flag.
使用和不使用 --ignore
标志删除不存在的图像。
$ podman rmi --ignore nothing
$ podman rmi nothing
Error: nothing: image not known
Exit Status¶ 退出状态 ¶
0 All specified images removed
0 所有指定的图像已移除
1 One of the specified images did not exist, and no other failures
1 指定的图像中有一个不存在,且没有其他失败
2 One of the specified images has child images or is being used by a container
2 指定的图像中有一个具有子图像或正在被容器使用
125 The command fails for any other reason
125 由于其他原因命令失败
SEE ALSO¶ 参见 ¶
HISTORY¶ 历史 ¶
March 2017, Originally compiled by Dan Walsh dwalsh@redhat.com
2017 年 3 月,最初由丹·沃尔什(Dan Walsh)dwalsh@redhat.com 编译