github.com/stchris/docker@v1.4.2-0.20150106053530-1510a324dbd5/docs/man/docker-rm.1.md (about)

     1  % DOCKER(1) Docker User Manuals
     2  % Docker Community
     3  % JUNE 2014
     4  # NAME
     5  docker-rm - Remove one or more containers
     6  
     7  # SYNOPSIS
     8  **docker rm**
     9  [**-f**|**--force**[=*false*]]
    10  [**-l**|**--link**[=*false*]]
    11  [**-v**|**--volumes**[=*false*]]
    12  CONTAINER [CONTAINER...]
    13  
    14  # DESCRIPTION
    15  
    16  **docker rm** will remove one or more containers from the host node. The
    17  container name or ID can be used. This does not remove images. You cannot
    18  remove a running container unless you use the \fB-f\fR option. To see all
    19  containers on a host use the **docker ps -a** command.
    20  
    21  # OPTIONS
    22  **-f**, **--force**=*true*|*false*
    23     Force the removal of a running container (uses SIGKILL). The default is *false*.
    24  
    25  **-l**, **--link**=*true*|*false*
    26     Remove the specified link and not the underlying container. The default is *false*.
    27  
    28  **-v**, **--volumes**=*true*|*false*
    29     Remove the volumes associated with the container. The default is *false*.
    30  
    31  # EXAMPLES
    32  
    33  ##Removing a container using its ID##
    34  
    35  To remove a container using its ID, find either from a **docker ps -a**
    36  command, or use the ID returned from the **docker run** command, or retrieve
    37  it from a file used to store it using the **docker run --cidfile**:
    38  
    39      docker rm abebf7571666
    40  
    41  ##Removing a container using the container name##
    42  
    43  The name of the container can be found using the **docker ps -a**
    44  command. The use that name as follows:
    45  
    46      docker rm hopeful_morse
    47  
    48  # HISTORY
    49  April 2014, Originally compiled by William Henry (whenry at redhat dot com)
    50  based on docker.com source material and internal work.
    51  June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
    52  July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
    53  August 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>