FreeKB - docker rm - delete container
docker rm - delete container

Home > Search

This assumes you have installed Docker on Linux and Docker is running. Before deleting a container, you'll want to use the docker ps command to return the list of containers, like this.

docker ps -a

CONTAINER ID     IMAGE              COMMAND                 CREATED         STATUS     PORTS     NAMES
d937372c09ab9    b939aa938add9913   "/docker-entrypoin..."  6 minutes ago   Created              my-container

 

The docker rm command followed by the container name will delete the container.

docker rm my-container

 

Reissuing the docker ps command should now show that the container is no longer listed.

docker ps -a

CONTAINER ID     IMAGE              COMMAND                 CREATED         STATUS     PORTS     NAMES

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 1e058 in the box below so that we can be sure you are a human.




Comments