podman-rmi(1)

πŸ’– podman-rmi β€” bestie edition πŸ’–

okay so this is the manual page for podman-rmi from the General Commands Manual section (that's section 1, bestie), and we're about to learn how to yeet images off your local storage. no cap. it's giving spring cleaning for your container images and honestly? obsessed. πŸ’…


✨ NAME ✨

podman-rmi β€” remove one or more locally stored images πŸ—‘οΈβœ¨


🌸 SYNOPSIS 🌸

podman rmi [options] image [...]

podman image rm [options] image [...]

two ways to say the same thing, and both of them ate. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

So basically it removes one or more locally stored images. When you pass it an argument image, that image gets deleted β€” along with any of its dangling parent images. and what's a dangling image, you ask? it's an image that has no tag and is not referenced by another image. like it's just... floating there. orphaned. no tag, no referrer, no friends. we're freeing it. πŸ•ŠοΈ

Note, bestie, listen up: if you wanna delete an image from a remote registry, use the skopeo delete command instead. and heads up β€” some registries straight up do not allow users to delete an image via a CLI remotely. not our fault, not our problem, we just report the facts. πŸ’€

πŸ‘‘ OPTIONS πŸ‘‘

  • --all, -a β€” remove all the images in the local storage. every single one. total reset energy. 🧹✨
  • --force, -f β€” this one makes Podman remove all the containers that are using the image before it removes the image from the system. it's not asking nicely, it's just doing it. πŸ”₯
  • --ignore, -i β€” if the image you named doesn't exist in local storage, this tells it to ignore that and not throw an error. no drama, no crying, no stack trace. πŸ™ˆ
  • --no-prune β€” this option says do NOT remove the dangling parents of the image you specified. the parents stay. we respect the parents here. πŸŽ€

🌈 EXAMPLES 🌈

Remove an image by its short ID β€” short king behavior, iconic:

$ podman rmi c0ed59d05ff7

Remove an image and its associated containers β€” no survivors, periodt:

$ podman rmi --force imageID

Remove multiple images by their shortened IDs β€” a whole squad, gone:

$ podman rmi c4dfb1609ee2 93fd78260bd1 c0ed59d05ff7

Remove all images and containers β€” the nuclear option, and honestly? slay:

$ podman rmi -a -f

Remove an absent image with and without the --ignore flag β€” watch the difference, bestie:

$ podman rmi --ignore nothing
$ podman rmi nothing
Error: nothing: image not known

see how the first one just vibes and the second one yells at you? that's the --ignore difference right there. 😭

Remove an image but keep any parents of it:

podman rmi --no-prune d29200bf974d
Deleted: d29200bf974dbc48dc66c23c4031548531b6b5943e5f25ee7bda232e3b6b27f4

⭐ Exit Status ⭐

  • 0 β€” all specified images removed πŸŽ‰
  • 1 β€” one of the specified images did not exist, and no other failures
  • 2 β€” one of the specified images has child images or is being used by a container 😬
  • 125 β€” the command fails for any other reason πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

podman(1), skopeo-delete(1) β€” go read those too, iykyk πŸ“šβœ¨


πŸŽ€ HISTORY πŸŽ€

March 2017, originally compiled by Dan Walsh dwalsh@redhat.com ⟨mailto:dwalsh@redhat.com⟩ β€” a legend, fr fr. πŸ‘‘


and that's the whole page, bestie!! 🫢 this was the General Commands Manual entry for podman-rmi(1), and yes the date really does say March 2017 β€” vintage but still eating. go forth and remove responsibly, and remember: --force is powerful, so use it like a main character who thinks things through. πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from