docker/cli ยท error
ERROR: The "until" filter is not supported with "--volumes"
Error message
ERROR: The "until" filter is not supported with "--volumes"
What it means
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).
Source
Thrown at cli/command/volume/prune.go:127
return spaceReclaimed, out.String(), nil
}
type invalidParamErr struct{ error }
func (invalidParamErr) InvalidParameter() {}
type cancelledErr struct{ error }
func (cancelledErr) Cancelled() {}
// pruneFn calls the Volume Prune API for use in "docker system prune",
// and returns the amount of space reclaimed and a detailed output string.
func pruneFn(ctx context.Context, dockerCli command.Cli, options pruner.PruneOptions) (uint64, string, error) {
// TODO version this once "until" filter is supported for volumes
// Ideally, this check wasn't done on the CLI because the list of
// filters that is supported by the daemon may evolve over time.
if _, ok := options.Filter.Value()["until"]; ok {
return 0, "", errors.New(`ERROR: The "until" filter is not supported with "--volumes"`)
}
if !options.Confirmed {
// Dry-run: perform validation and produce confirmation before pruning.
confirmMsg := "all anonymous volumes not used by at least one container"
return 0, confirmMsg, cancelledErr{errors.New("volume prune has been cancelled")}
}
return runPrune(ctx, dockerCli, pruneOptions{
force: true,
filter: options.Filter,
})
}
View on GitHub (pinned to e9452d6e78)
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`)
Example fix
# before docker system prune --volumes --filter until=24h # after docker system prune --filter until=24h docker volume prune -f --filter label=ephemeral=true
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- conflicting options: cannot specify both --all and --filter
- volume prune has been cancelled
- builder prune has been cancelled
- container prune has been cancelled
- filtering is not supported when specifying a list of contain
AI-assisted analysis of docker/cli@e9452d6e78 (2026-08-01).
Data as JSON: /data/errors/ace35dcca80f7922.json.
Report an issue: GitHub.