Docker Cheat Sheet/Force remove a running container

Force-remove a running container.

Section: Containers

Force remove a running container

bash
bash
docker rm -f web
Explanation

Equivalent to killing then removing it.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Containers
Remove a stopped container
Remove one or more stopped containers.
OpenIn sheetbashsame section
Run and remove on exit
Automatically remove the container after it exits.
OpenIn sheetbashsame section
Prune stopped containers
Remove all stopped containers.
OpenIn sheetbashsame section
Run a container
Create and start a new container.
OpenIn sheetbashsame section
Run detached
Run a container in the background.
OpenIn sheetbashsame section
Run interactively
Run an interactive shell inside a new container.
OpenIn sheetbashsame section