code: func newPruneCommand(dockerCli command.Cli) *cobra.Command {
  	options := pruneOptions{filter: opts.NewFilterOpt()}
  
  	cmd := &cobra.Command{
  		Use:   "prune [OPTIONS]",
  		Short: "Remove unused data",
  		Args:  cli.NoArgs,
  		RunE: func(cmd *cobra.Command, args []string) error {
  			options.pruneBuildCache = versions.GreaterThanOrEqualTo(dockerCli.Client().ClientVersion(), "1.31")
  			return runPrune(dockerCli, options)
  		},
  		Annotations: map[string]string{"version": "1.25"},
  	}
  
  	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.BoolVar(&options.pruneVolumes, "volumes", false, "Prune volumes")
  	flags.Var(&options.filter, "filter", "Provide filter values (e.g. 'label=<key>=<value>')")
  	// "filter" flag is available in 1.28 (docker 17.04) and up
  	flags.SetAnnotation("filter", "version", []string{"1.28"})
  
  	return cmd
  }
docs: // newPruneCommand creates a new cobra.Command for `docker prune`