buildah-rmi(1)

πŸ“¦
version 1.45.0 Β· 4 versions
, in centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu noble, ubuntu questing

✨ buildah-rmi β€” the "okay bestie, time to let that image go" page πŸ’…

so this is a page from the General Commands Manual, and it's all about buildah-rmi. yeah. the glow-up-your-storage one. let's get into it 🫢

🌸 NAME 🌸

buildah-rmi β€” removes one or more images. like, bye πŸ¦‹

🌈 SYNOPSIS 🌈

buildah rmi [image ...]

πŸ’– DESCRIPTION πŸ’–

Removes one or more locally stored images. it's giving spring cleaning but for your disk, fr fr.

Passing an argument image deletes it β€” and not just it, okay? it also takes out any of its dangling (untagged) parent images. the whole situationship. gone. ✨

πŸ’€ LIMITATIONS πŸ’€

okay so there are a few things you need to know before you start deleting, because this is where people get got:

  • If the image was pushed to a directory path using the 'dir:' transport, the rmi command can not remove the image. nope. not happening. Instead, standard file system commands should be used. so like, rm. the classic. πŸ’…
  • If imageID is a name, but does not include a registry name, buildah will attempt to find and remove the named image using the registry name localhost, if no such image is found, it will search for the intended image by attempting to expand the given name using the names of registries provided in the system's registries configuration file, registries.conf. she's doing detective work πŸ”
  • If the imageID refers to a manifest list or image index, this command will not do what you expect! 🚨 This command will remove the images associated with the manifest list or index (not the manifest list/image index itself). To remove that, use the buildah manifest rm subcommand instead. read that again bestie, i'm serious 😭

✨ OPTIONS ✨

  • --all, -a β€” All local images will be removed from the system that do not have containers using the image as a reference image. An image name or id cannot be provided when this option is used. and heads up: Read/Only images configured by modifying the "additionalimagestores" in the /etc/containers/storage.conf file, can not be removed. so don't come for those, they're protected πŸ”’
  • --force, -f β€” This option will cause Buildah to remove all containers that are using the image before removing the image from the system. no survivors, no cap πŸ’₯
  • --prune, -p β€” All local images will be removed from the system that do not have a tag and do not have a child image pointing to them. An image name or id cannot be provided when this option is used. the untagged orphans?? yeah they gotta go πŸŒͺ️

πŸŽ€ EXAMPLE πŸŽ€

here's the vibe, copy-paste ready:

buildah rmi imageID
buildah rmi --all
buildah rmi --all --force
buildah rmi --prune
buildah rmi --force imageID
buildah rmi imageID1 imageID2 imageID3

πŸ“ Files πŸ“

registries.conf (/etc/containers/registries.conf)

registries.conf is the configuration file which specifies which container registries should be consulted when completing image names which do not include a registry or domain portion.

storage.conf (/etc/containers/storage.conf)

storage.conf is the storage configuration file for all tools using containers/storage

The storage configuration file specifies all of the available container storage options for tools using shared container storage.

πŸ‘‘ SEE ALSO πŸ‘‘

buildah(1), containers-registries.conf(5), containers-storage.conf(5)


and that's the whole page, bestie 🌟 this one's from buildah, dated March 2017, and it's the buildah-rmi(1) page β€” go forth and delete responsibly, mwah πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from