Cheatsheet Pages / Docker Cheatsheet

How to delete a Docker container — docker rm

A container is done for good and should disappear.

docker rm web       # stopped only
docker rm -f web    # stop AND delete, right now

Good to know

Plain rm only works on stopped containers; -f stops and deletes in one go.

Docker Cheatsheet one-page card — commands that actually work
The full one-page card — Docker Cheatsheet. Get the complete cheatsheet on GitHub