docker-rm.1 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. .\" Process this file with
  2. .\" nroff -man -Tascii docker-rm.1
  3. .\"
  4. .TH "DOCKER" "1" "MARCH 2014" "0.1" "Docker"
  5. .SH NAME
  6. docker-rm \- Remove one or more containers.
  7. .SH SYNOPSIS
  8. .B docker rm
  9. [\fB-f\fR|\fB--force\fR[=\fIfalse\fR]
  10. [\fB-l\fR|\fB--link\fR[=\fIfalse\fR]
  11. [\fB-v\fR|\fB--volumes\fR[=\fIfalse\fR]
  12. CONTAINER [CONTAINER...]
  13. .SH DESCRIPTION
  14. 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.
  15. .SH "OPTIONS"
  16. .TP
  17. .B -f, --force=\fItrue\fR|\fIfalse\fR:
  18. When set to true, force the removal of the container. The default is \fIfalse\fR.
  19. .TP
  20. .B -l, --link=\fItrue\fR|\fIfalse\fR:
  21. When set to true, remove the specified link and not the underlying container. The default is \fIfalse\fR.
  22. .TP
  23. .B -v, --volumes=\fItrue\fR|\fIfalse\fR:
  24. When set to true, remove the volumes associated to the container. The default is \fIfalse\fR.
  25. .SH EXAMPLES
  26. .sp
  27. .PP
  28. .B Removing a container using its ID
  29. .TP
  30. 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:
  31. .sp
  32. .RS
  33. docker rm abebf7571666
  34. .RE
  35. .sp
  36. .B Removing a container using the container name:
  37. .TP
  38. The name of the container can be found using the \fBdocker ps -a\fR command. The use that name as follows:
  39. .sp
  40. .RS
  41. docker rm hopeful_morse
  42. .RE
  43. .sp
  44. .SH HISTORY
  45. March 2014, Originally compiled by William Henry (whenry at redhat dot com) based on dockier.io source material and internal work.