mirror of
https://github.com/docker/docs.git
synced 2026-03-29 23:38:56 +07:00
* Update docs on command help This is change is based on the output of the script proposed by @smola in: https://github.com/docker/docker.github.io/pull/11173 Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com> * Formatting updates * Minor style update Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
33 lines
943 B
Markdown
33 lines
943 B
Markdown
---
|
|
description: Removes stopped service containers.
|
|
keywords: fig, composition, compose, docker, orchestration, cli, rm
|
|
title: docker-compose rm
|
|
notoc: true
|
|
---
|
|
|
|
```none
|
|
Usage: rm [options] [SERVICE...]
|
|
|
|
Options:
|
|
-f, --force Don't ask to confirm removal
|
|
-s, --stop Stop the containers, if required, before removing
|
|
-v Remove any anonymous volumes attached to containers
|
|
-a, --all Deprecated - no effect.
|
|
```
|
|
|
|
Removes stopped service containers.
|
|
|
|
By default, anonymous volumes attached to containers are not removed. You
|
|
can override this with `-v`. To list all volumes, use `docker volume ls`.
|
|
|
|
Any data which is not in a volume is lost.
|
|
|
|
Running the command with no options also removes one-off containers created
|
|
by `docker-compose up` or `docker-compose run`:
|
|
|
|
```none
|
|
$ docker-compose rm
|
|
Going to remove djangoquickstart_web_run_1
|
|
Are you sure? [yN] y
|
|
Removing djangoquickstart_web_run_1 ... done
|
|
``` |