{"id":"ace35dcca80f7922","repo":"docker/cli","slug":"error-the-until-filter-is-not-supported-with","errorCode":null,"errorMessage":"ERROR: The \"until\" filter is not supported with \"--volumes\"","messagePattern":"ERROR: The \"until\" filter is not supported with \"--volumes\"","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/volume/prune.go","lineNumber":127,"sourceCode":"\treturn spaceReclaimed, out.String(), nil\n}\n\ntype invalidParamErr struct{ error }\n\nfunc (invalidParamErr) InvalidParameter() {}\n\ntype cancelledErr struct{ error }\n\nfunc (cancelledErr) Cancelled() {}\n\n// pruneFn calls the Volume Prune API for use in \"docker system prune\",\n// and returns the amount of space reclaimed and a detailed output string.\nfunc pruneFn(ctx context.Context, dockerCli command.Cli, options pruner.PruneOptions) (uint64, string, error) {\n\t// TODO version this once \"until\" filter is supported for volumes\n\t// Ideally, this check wasn't done on the CLI because the list of\n\t// filters that is supported by the daemon may evolve over time.\n\tif _, ok := options.Filter.Value()[\"until\"]; ok {\n\t\treturn 0, \"\", errors.New(`ERROR: The \"until\" filter is not supported with \"--volumes\"`)\n\t}\n\tif !options.Confirmed {\n\t\t// Dry-run: perform validation and produce confirmation before pruning.\n\t\tconfirmMsg := \"all anonymous volumes not used by at least one container\"\n\t\treturn 0, confirmMsg, cancelledErr{errors.New(\"volume prune has been cancelled\")}\n\t}\n\treturn runPrune(ctx, dockerCli, pruneOptions{\n\t\tforce:  true,\n\t\tfilter: options.Filter,\n\t})\n}\n","sourceCodeStart":109,"sourceCodeEnd":139,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/volume/prune.go#L109-L139","documentation":"Raised by the volume pruner used by `docker system prune --volumes` (pruneFn in cli/command/volume/prune.go). The Docker daemon's volume prune API does not support the `until` time filter, so the CLI rejects the combination client-side before calling the API. The check lives in the CLI as a stopgap (a TODO notes it should ideally be daemon-versioned).","triggerScenarios":"Running `docker system prune --volumes --filter until=<timestamp>` (e.g. `--filter until=24h`). The filter map is inspected for an 'until' key in pruneFn and the command aborts before any pruning occurs.","commonSituations":"Cleanup scripts that use `--filter until=24h` for images/containers and add `--volumes`, expecting the time filter to apply uniformly; users assuming volume prune supports the same filters as image/container prune.","solutions":["Remove the `until` filter when using --volumes, or run two separate commands: `docker system prune --filter until=24h` and `docker volume prune -f` (with a supported filter like label)","Use label-based filters for volumes instead: `docker volume prune -f --filter label=temp=true`","Prune volumes selectively by name with `docker volume rm` if age-based selection is needed (script it via `docker volume ls`)"],"exampleFix":"# before\ndocker system prune --volumes --filter until=24h\n# after\ndocker system prune --filter until=24h\ndocker volume prune -f --filter label=ephemeral=true","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":["docker-cli","volume","prune","filter","unsupported-option"],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}