31.6 Removing an Image from Local Storage
To remove an image from local storage once it is no longer needed, simply run the podman rmi command, referencing either the image name or ID as output by the podman images command. For example, to remove the image named myubuntu_image created in the previous section, run podman as follows:
$ podman rmi localhost/myubuntu_image
Note before an image can be removed, any containers based on that image must first be removed.