To show all docker containers that are running you can use the following command:

docker ps -a 

show all docker containers

To show all docker images available use the following command

docker images -a

docker images

First we need to stop all running containers:

docker stop $(docker ps -a -q)

Next we remove all containers:

docker rm $(docker ps -a -q)

Then we can delete all used images:

docker rmi $(docker images -a -q)

4 comments

Leave your comment

In reply to Some User
We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.