2022-03-09 12:57:07 +01:00
# docker compose down
2021-03-11 16:20:30 +01:00
2022-03-09 12:57:07 +01:00
<!-- - MARKER_GEN_START -->
2024-07-17 11:27:58 +02:00
Stops containers and removes containers, networks, volumes, and images created by `up` .
By default, the only things removed are:
- Containers for services defined in the Compose file.
- Networks defined in the networks section of the Compose file.
- The default network, if one is used.
Networks and volumes defined as external are never removed.
Anonymous volumes are not removed by default. However, as they don’ t have a stable name, they are not automatically
mounted by a subsequent `up` . For data that needs to persist between updates, use explicit paths as bind mounts or
named volumes.
2022-03-09 12:57:07 +01:00
### Options
2024-02-14 20:02:37 +01:00
| Name | Type | Default | Description |
|:-------------------|:---------|:--------|:------------------------------------------------------------------------------------------------------------------------|
2024-07-17 11:27:58 +02:00
| `--dry-run` | `bool` | | Execute command in dry run mode |
| `--remove-orphans` | `bool` | | Remove containers for services not defined in the Compose file |
2024-02-14 20:02:37 +01:00
| `--rmi` | `string` | | Remove images used by services. "local" remove only images that don't have a custom tag ("local"\|"all") |
| `-t` , `--timeout` | `int` | `0` | Specify a shutdown timeout in seconds |
2024-07-17 11:27:58 +02:00
| `-v` , `--volumes` | `bool` | | Remove named volumes declared in the "volumes" section of the Compose file and anonymous volumes attached to containers |
2022-03-09 12:57:07 +01:00
<!-- - MARKER_GEN_END -->
2021-03-11 16:20:30 +01:00
## Description
2021-09-13 22:58:29 +02:00
Stops containers and removes containers, networks, volumes, and images created by `up` .
2021-03-11 16:20:30 +01:00
By default, the only things removed are:
2023-10-31 10:40:48 +00:00
- Containers for services defined in the Compose file.
- Networks defined in the networks section of the Compose file.
- The default network, if one is used.
2021-03-11 16:20:30 +01:00
Networks and volumes defined as external are never removed.
2023-10-31 10:40:48 +00:00
Anonymous volumes are not removed by default. However, as they don’ t have a stable name, they are not automatically
2021-03-11 16:20:30 +01:00
mounted by a subsequent `up` . For data that needs to persist between updates, use explicit paths as bind mounts or
named volumes.