Forrest logo
back to the docker tool

docker:tldr:0bdca

docker: Stop and remove all containers, networks, images, and volumes.
$ docker compose down --rmi all --volumes
try on your machine

The command docker compose down --rmi all --volumes is used to stop and remove a Docker Compose application or stack, along with its associated containers, networks, and volumes.

Here's a breakdown of the command options:

  • docker compose down: This command is used to stop and remove a Docker Compose application or stack. It brings down all the services defined in the Compose file.

  • --rmi all: This option is used to remove all the images associated with the services defined in the Compose file. By specifying --rmi all, it ensures that all the images are removed, even if they are being used by other containers.

  • --volumes: This option is used to remove the volumes created by the services defined in the Compose file. Volumes are used to persist data generated by containers, and this option ensures that all the volumes associated with the application are also removed.

Overall, this command helps to completely remove a Docker Compose application and clean up any associated resources like containers, networks, images, and volumes.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the docker tool