I recently started using Docker and never realized that I should use docker-compose down
instead of ctrl-c
or docker-compose stop
to get r
Adding to techtabu's accepted answer, If you're using docker on windows, you can use the following command
for /F "delims=" %A in ('docker ps -a -q') do docker rm %A
here, the command docker ps -a -q
lists all the images and this list is passed to docker rm
one by one
see this for more details on how this type of command format works in windows cmd.