Delete stopped containers Run in API Explorer
Query parameters
-
Filters to process on the prune list, encoded as JSON (a
map[string][]string
).Available filters:
until=<timestamp>
Prune containers created before this timestamp. The<timestamp>
can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g.10m
,1h30m
) computed relative to the daemon machine’s time.label
(label=<key>
,label=<key>=<value>
,label!=<key>
, orlabel!=<key>=<value>
) Prune containers with (or without, in caselabel!=...
is used) the specified labels.
POST
/containers/prune
curl \
--request POST 'http://api.example.com/v1.44/containers/prune'
Response examples (200)
{
"ContainersDeleted": [
"string"
],
"SpaceReclaimed": 42
}
Response examples (500)
{
"message": "Something went wrong."
}
Response examples (500)
{
"message": "Something went wrong."
}