Fix container image prune to actually remove images, add -a flag support, and bump cz to 0.15.0#909
Merged
katiewasnothere merged 2 commits intoapple:mainfrom Nov 21, 2025
Conversation
9585307 to
df9fafa
Compare
katiewasnothere
approved these changes
Nov 21, 2025
saehejkang
pushed a commit
to saehejkang/container
that referenced
this pull request
Jan 27, 2026
…support, and bump cz to 0.15.0 (apple#909) - Fixes apple#901. ## Type of Change - [x] Bug fix - [x] New feature - [ ] Breaking change - [ ] Documentation update ## Motivation and Context Previously `container image prune` called `ImageStore.prune()` (renamed to `cleanupOrphanedBlobs()` in cz 0.15.0) which only removed orphaned content blobs and never actually removed images. This PR fixes that behavior so `container image prune` removes dangling images by default, and with `-a` removes all unused images, not just dangling ones. ## Testing - [x] Tested locally - [ ] Added/updated tests - [ ] Added/updated docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
container image prunedoesn't remove images, only orphaned blobs #901.Type of Change
Motivation and Context
Previously
container image prunecalledImageStore.prune()(renamed tocleanupOrphanedBlobs()in cz 0.15.0) which only removed orphaned content blobs and never actually removed images.This PR fixes that behavior so
container image pruneremoves dangling images by default, and with-aremoves all unused images, not just dangling ones.Testing