podman-rmi:tldr:0bd82
The command "podman rmi" is used to remove one or more container images from the local system.
The "podman rmi" command syntax is as follows:
podman rmi [OPTIONS] IMAGE [IMAGE...]
Here, "OPTIONS" refer to additional flags or parameters that can be used to modify the behavior of the command. "IMAGE" specifies the name or ID of the container image(s) to be removed.
Some commonly used options with "podman rmi" command are:
-f
or--force
: Forces the removal of the image even if it is being used by a running container.--all
or-a
: Removes all images from the local system, except for those that are in use by existing containers.
For example, to remove a single container image with the name "my-image", the command would be:
podman rmi my-image
To forcefully remove an image, even if it's being used by a container, the command would be:
podman rmi -f my-image
To remove all container images from the local system, excluding the ones in use by running containers, the command would be:
podman rmi --all
It's important to note that the "podman rmi" command permanently deletes the specified container image(s) from the local system, and this action cannot be undone.