Debian Codegraph @

docs/reference/docker_compose_rm.yaml

raw
1 command: docker compose rm
2 short: Removes stopped service containers
3 long: |-
4 Removes stopped service containers.
5
6 By default, anonymous volumes attached to containers are not removed. You can override this with `-v`. To list all
7 volumes, use `docker volume ls`.
8
9 Any data which is not in a volume is lost.
10
11 Running the command with no options also removes one-off containers created by `docker compose run`:
12
13 ```console
14 $ docker compose rm
15 Going to remove djangoquickstart_web_run_1
16 Are you sure? [yN] y
17 Removing djangoquickstart_web_run_1 ... done
18 ```
19 usage: docker compose rm [OPTIONS] [SERVICE...]
20 pname: docker compose
21 plink: docker_compose.yaml
22 options:
23 - option: all
24 shorthand: a
25 value_type: bool
26 default_value: "false"
27 description: Deprecated - no effect
28 deprecated: false
29 hidden: true
30 experimental: false
31 experimentalcli: false
32 kubernetes: false
33 swarm: false
34 - option: force
35 shorthand: f
36 value_type: bool
37 default_value: "false"
38 description: Don't ask to confirm removal
39 deprecated: false
40 hidden: false
41 experimental: false
42 experimentalcli: false
43 kubernetes: false
44 swarm: false
45 - option: stop
46 shorthand: s
47 value_type: bool
48 default_value: "false"
49 description: Stop the containers, if required, before removing
50 deprecated: false
51 hidden: false
52 experimental: false
53 experimentalcli: false
54 kubernetes: false
55 swarm: false
56 - option: volumes
57 shorthand: v
58 value_type: bool
59 default_value: "false"
60 description: Remove any anonymous volumes attached to containers
61 deprecated: false
62 hidden: false
63 experimental: false
64 experimentalcli: false
65 kubernetes: false
66 swarm: false
67 inherited_options:
68 - option: dry-run
69 value_type: bool
70 default_value: "false"
71 description: Execute command in dry run mode
72 deprecated: false
73 hidden: false
74 experimental: false
75 experimentalcli: false
76 kubernetes: false
77 swarm: false
78 deprecated: false
79 hidden: false
80 experimental: false
81 experimentalcli: false
82 kubernetes: false
83 swarm: false
84