Skip to content

Cleaning up: rm, rmi and prune

Select an icon to see what it is.

Step 4 of 6

prune commands delete in bulk

Each kind of object has its own prune call: containers, images, networks, volumes and the build cache. They delete only things that nothing uses. docker container prune removes all stopped containers, docker image prune removes dangling images, and docker network prune removes networks with no containers.

POST /v1.45/containers/prune

{
"ContainersDeleted": [
"<id>"
"<id>"
]
"SpaceReclaimed": 0
}