Cleaning up: rm, rmi and prune
Select an icon to see what it is.
Step 2 of 6
rm deletes a container, rmi an image
docker rm sends DELETE /containers/{id}, and the container must be stopped unless you add -f. docker rmi sends DELETE /images/{name}. An image that a container uses cannot be removed unless you force it.
$ docker rm -f sleeper && docker rmi nginxDELETE /v1.45/containers/<id>
204 No Content409 Conflict if the container is running and force is not set