Forrest logo
back to the podman tool

podman-rmi:tldr:7af7d

podman-rmi: Remove an image without deleting untagged parents.
$ podman rmi --no-prune ${image}
try on your machine

The command "podman rmi --no-prune ${image}" is used to remove a specific container image from your system, without automatically pruning (deleting) the unused images.

Here's a breakdown of each part of the command:

  • "podman": This is the command-line utility used to manage containers, similar to Docker. It allows you to run, manage, and remove containers and container images.

  • "rmi": This is a shorthand for "remove image". It tells Podman that you want to remove an image from your system.

  • "--no-prune": This flag disables the automatic pruning of unused images. By default, Podman will remove any images that are not associated with any running or paused containers. However, using the "--no-prune" flag ensures that the image you're trying to remove is not automatically deleted even if it's not currently being used by any containers.

  • "${image}": This is a placeholder for the name or ID of the image you want to remove. You need to replace "${image}" with the actual name or ID of the image you want to delete before running the command.

By executing this command, you can remove a specific container image from your system without worrying about it being pruned (deleted) by Podman automatically.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the podman tool