| .\" Process this file with |
| .\" nroff -man -Tascii docker-rm.1 |
| .\" |
| .TH "DOCKER" "1" "MARCH 2014" "0.1" "Docker" |
| .SH NAME |
| docker-rm \- Remove one or more containers. |
| .SH SYNOPSIS |
| .B docker rm |
| [\fB-f\fR|\fB--force\fR[=\fIfalse\fR] |
| [\fB-l\fR|\fB--link\fR[=\fIfalse\fR] |
| [\fB-v\fR|\fB--volumes\fR[=\fIfalse\fR] |
| CONTAINER [CONTAINER...] |
| .SH DESCRIPTION |
| This will remove one or more containers from the host node. The container name or ID can be used. This does not remove images. You cannot remove a running container unless you use the \fB-f\fR option. To see all containers on a host use the \fBdocker ps -a\fR command. |
| .SH "OPTIONS" |
| .TP |
| .B -f, --force=\fItrue\fR|\fIfalse\fR: |
| When set to true, force the removal of the container. The default is \fIfalse\fR. |
| .TP |
| .B -l, --link=\fItrue\fR|\fIfalse\fR: |
| When set to true, remove the specified link and not the underlying container. The default is \fIfalse\fR. |
| .TP |
| .B -v, --volumes=\fItrue\fR|\fIfalse\fR: |
| When set to true, remove the volumes associated to the container. The default is \fIfalse\fR. |
| .SH EXAMPLES |
| .sp |
| .PP |
| .B Removing a container using its ID |
| .TP |
| To remove a container using its ID, find either from a \fBdocker ps -a\fR command, or use the ID returned from the \fBdocker run\fR command, or retrieve it from a file used to store it using the \fBdocker run --cidfile\fR: |
| .sp |
| .RS |
| docker rm abebf7571666 |
| .RE |
| .sp |
| .B Removing a container using the container name: |
| .TP |
| The name of the container can be found using the \fBdocker ps -a\fR command. The use that name as follows: |
| .sp |
| .RS |
| docker rm hopeful_morse |
| .RE |
| .sp |
| .SH HISTORY |
| March 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work. |