diff --git a/cli/command/system/prune.go b/cli/command/system/prune.go index 7b77a3be62..11a45146a7 100644 --- a/cli/command/system/prune.go +++ b/cli/command/system/prune.go @@ -34,7 +34,9 @@ func NewPruneCommand(dockerCli command.Cli) *cobra.Command { flags := cmd.Flags() flags.BoolVarP(&options.force, "force", "f", false, "Do not prompt for confirmation") flags.BoolVarP(&options.all, "all", "a", false, "Remove all unused images not just dangling ones") - flags.Var(&options.filter, "filter", "Provide filter values (e.g. 'until=')") + flags.Var(&options.filter, "filter", "Provide filter values (e.g. 'label==')") + // "filter" flag is available in 1.28 (docker 17.04) and up + flags.SetAnnotation("filter", "version", []string{"1.28"}) return cmd }