HostOnNet Blog


Remove all docker containers

To remove all docker containers, run

docker rm -f $(docker ps -aq)

docker rm = remove container

-f = will stop container if running

docker ps -aq = List all containers.

-a list stopped containers.

-q only print container ID.

Delete all docker images

docker rmi -f $(docker images -q)

More Docker


Posted in Virtualization