To show all docker containers that are running you can use the following command:
docker ps -a
To show all docker images available use the following command
docker images -a
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)