Skip to content
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

Add --force flag to images prune #4519

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmd/podman/cliconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ type HistoryValues struct {
}
type PruneImagesValues struct {
PodmanCommand
All bool
All bool
Force bool
}

type PruneContainersValues struct {
Expand Down
1 change: 1 addition & 0 deletions cmd/podman/images_prune.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func init() {
pruneImagesCommand.SetUsageTemplate(UsageTemplate())
flags := pruneImagesCommand.Flags()
flags.BoolVarP(&pruneImagesCommand.All, "all", "a", false, "Remove all unused images, not just dangling ones")
flags.BoolVarP(&pruneImagesCommand.Force, "force", "f", false, "Do not prompt for confirmation on pruning images")
}

func pruneImagesCmd(c *cliconfig.PruneImagesValues) error {
Expand Down