diff --git a/cli/command/system/prune.go b/cli/command/system/prune.go index c0bc434fb0..d76d995e37 100644 --- a/cli/command/system/prune.go +++ b/cli/command/system/prune.go @@ -67,6 +67,10 @@ func runBuildCachePrune(dockerCli command.Cli, _ opts.FilterOpt) (uint64, string } func runPrune(dockerCli command.Cli, options pruneOptions) error { + // TODO version this once "until" filter is supported for volumes + if options.pruneVolumes && options.filter.Value().Include("until") { + return fmt.Errorf(`ERROR: The "until" filter is not supported with "--volumes"`) + } if versions.LessThan(dockerCli.Client().ClientVersion(), "1.31") { options.pruneBuildCache = false }