docker-compose-down
Stop and remove containers, networks, images, and volumes created by docker compose up. tldr-pages
On several platforms
Several platforms
Stop and remove all containers and networks
docker compose downIdentifyStop and remove containers, networks, and all images used by services
docker compose down --rmi allIdentify--rmiRemove images used by services. Docker Compose referenceStop and remove containers, networks, and only images without a custom tag
docker compose down --rmi localIdentify--rmiRemove images used by services. Docker Compose referenceStop and remove containers, networks, and all volumes
docker compose down --volumesIdentify--volumesRemove named volumes declared in the "volumes" section of the Compose file and anonymous volumes attached to containers Docker Compose referenceStop and remove everything including orphaned containers
docker compose down --remove-orphansIdentify--remove-orphansRemove containers for services not defined in the Compose file Docker Compose referenceStop and remove containers using an alternate compose file
docker compose --file path/to/config downIdentify--fileCompose configuration files Docker Compose referenceStop and remove containers with a custom timeout in seconds
docker compose down --timeout timeoutIdentify--timeoutSpecify a shutdown timeout in seconds Docker Compose referenceRemove containers for services not defined in the Compose file
docker compose down --remove-orphans --volumesIdentify--remove-orphansRemove containers for services not defined in the Compose file Docker Compose reference--volumesRemove named volumes declared in the "volumes" section of the Compose file and anonymous volumes attached to containers Docker Compose reference