Files
podman/docs/podman-rmi.1.md
Daniel J Walsh 5370d9cb76 Add new exit codes to rm & rmi for running containers & dependencies
This enables programs and scripts wrapping the podman command to handle
'podman rm' and 'podman rmi' failures caused by paused or running
containers or due to images having other child images or dependent
containers. These errors are common enough that it makes sense to have
a more machine readable way of detecting them than parsing the standard
error output.

Signed-off-by: Ondrej Zoder <ozoder@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-08-01 03:40:29 -04:00

1.1 KiB

% podman-rmi(1)

NAME

podman-image-rm (podman-rmi) - Removes one or more images

SYNOPSIS

podman image rm image [...]

podman rmi image [...]

DESCRIPTION

Removes one or more locally stored images.

OPTIONS

-all, -a

Remove all images in the local storage.

--force, -f

This option will cause podman to remove all containers that are using the image before removing the image from the system.

Remove an image by its short ID

podman rmi c0ed59d05ff7

Remove an image and its associated containers.

podman rmi --force imageID

Remove multiple images by their shortened IDs.

podman rmi c4dfb1609ee2 93fd78260bd1 c0ed59d05ff7

Remove all images and containers.

podman rmi -a -f

Exit Status

0 if all specified images removed 1 if one of the specified images did not exist, and no other failures 2 if one of the specified images has child images or is being used by a container 125 if the command fails for a reason other than an image did not exist or is in use

SEE ALSO

podman(1)

HISTORY

March 2017, Originally compiled by Dan Walsh dwalsh@redhat.com