-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podman image prune
should act recursively
#7872
Comments
Thanks for opening the issue, @srcshelton! I try to have a look tomorrow. There are certain code paths that have not yet been optimized but we plan to. The issue is a motivator to tackle prune :) |
Removed the good-first issue label as I find it non-trivial to fix without knowing the code. |
Make sure to remove images until there's nothing left to prune. A single iteration may not be sufficient. Fixes: containers#7872 Signed-off-by: Valentin Rothberg <[email protected]>
Opened #7887 to fix the issue. Note that it does not improve performance yet. There are some CPU cycles we can squeeze out but it would require some longer refactoring. It's still on the roadmap though, along with other code paths. |
Just a quick note to say that while #7887 fixes this issue with Could this issue please be re-opened to consider this case also? |
Can you share a reproducer? The image-pruning code is shared, so it seems to be another issue. |
I suggest opening a new issue, ideally with a reproducer. |
Make sure to remove images until there's nothing left to prune. A single iteration may not be sufficient. Fixes: containers#7872 Signed-off-by: Valentin Rothberg <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
It's notable as other bugs have indicated that
podman image ls
can be very slow (although this is better nowadays). What is still noticeable is thatimage ls
completes much faster with fewer images.However,
podman image prune
appears to only remove images which were unreferenced when it was invoked, and doesn't recurse to also remove any images that the removal of the original images free up.I wrote a quick script to look until no further images are freed, the output from a real-world run of which appears below:
... so, in this case, the initial
podman image prune
only removed about half of the prunable images. This surely isn't the intention?Output of
podman version
:Output of
podman info --debug
:Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
The text was updated successfully, but these errors were encountered: