Replies: 3 comments 17 replies
-
If you know what image you want to remove, is there any reason to not just call |
Beta Was this translation helpful? Give feedback.
-
The reason I can't call I'll give an example: Let's assume my Quadlet file is:
So, podman will be running the Now, let's say I would like to upgrade by pulling the new image
However, I do not wish for the upgrade to happen at the time that I'm pulling the update, but only after reboot (or after the user explicitly ask for it). Please keep in mind that changes to the Quadlet file are not processes by Quadlet until either a reboot or a call to So, when my update phase is complete, I have both images locally, So, what I am suggesting here is the ability to mark I think the alternative will be to implement this mechanism separately. That is, maintain a list of images marked for pruning and have a process run |
Beta Was this translation helpful? Give feedback.
-
Parsing the quadlet files would not be enough, you would also need to parse the kube.YAML files. It would quickly get out of control. We might have to deal with additional stores as well. I think potentially adding a last time used date to RW images could come in handy. Might be useful for all users, what images are in my store that have not been used in one month, year, decade. |
Beta Was this translation helpful? Give feedback.
-
I have a use case in which I would like to pull a new version of an image, but not use it until reboot (or an explicit service restart). As a result, since the image may be currently in use, I cannot remove the old image during the same process.
Podman offers an
images prune
command that may be used to remove dangling images or even all unused images (by passing--all
). But, removing all unused images is not the right solution in an environment with limited connectivity as it might remove images that will be used in the future, just not at the timeprune
is called.Alternatively, the
prune
command also supports afilter
argument to prune only the images containing certain labels (or label=value). However, labels are set during the creation of the image and cannot be altered. So, this path is blocked.So, I would like to add a command that will mark images for removal and then an option to prune to remove such images.
Beta Was this translation helpful? Give feedback.
All reactions