1podman-container-cleanup(1) General Commands Manualpodman-container-cleanup(1)
2
3
4

NAME

6       podman-container-cleanup  - Clean up the container's network and mount‐
7       points
8
9

SYNOPSIS

11       podman container cleanup [options] container [container ...]
12
13

DESCRIPTION

15       podman container cleanup cleans up exited containers  by  removing  all
16       mountpoints  and  network  configurations  from the host. The container
17       name or ID can be used. The cleanup command does not  remove  the  con‐
18       tainers. Running containers are not cleaned up.
19       Sometimes  container  mount points and network stacks can remain if the
20       podman command was killed or the container ran  in  daemon  mode.  This
21       command  is  automatically  executed  when containers are run in daemon
22       mode by the conmon process when the container exits.
23
24

OPTIONS

26   --all, -a
27       Clean up all containers.
28       The default is false.
29       IMPORTANT: This OPTION does not need a container name or  ID  as  input
30       argument.
31
32
33   --exec=session
34       Clean up an exec session for a single container.  It can only be speci‐
35       fied if a single container is being cleaned up (conflicts with --all as
36       such).  If  --rm is not specified, temporary files for the exec session
37       are cleaned up; if it is, the exec session is  removed  from  the  con‐
38       tainer.
39       *IMPORTANT:  Conflicts with --rmi as the container is not being cleaned
40       up so the image cannot be removed.*
41
42
43   --latest, -l
44       Instead of providing the container ID or name,  use  the  last  created
45       container.  The default is false.  IMPORTANT: This OPTION is not avail‐
46       able with the remote Podman client, including Mac and Windows  (exclud‐
47       ing WSL2) machines. This OPTION does not need a container name or ID as
48       input argument.
49
50
51   --rm
52       After cleanup, remove the container entirely.
53       The default is false.
54
55
56   --rmi
57       After cleanup, remove the image entirely.
58       The default is false.
59
60

EXAMPLES

62       Clean up the container "mywebserver".
63
64       $ podman container cleanup mywebserver
65
66
67
68       Clean up the containers with the names "mywebserver",  "myflaskserver",
69       "860a4b23".
70
71       $ podman container cleanup mywebserver myflaskserver 860a4b23
72
73
74

SEE ALSO

76       podman(1), podman-container(1), conmon(8)
77
78

HISTORY

80       Jun   2018,   Originally   compiled   by  Dan  Walsh  dwalsh@redhat.com
81       ⟨mailto:dwalsh@redhat.com⟩
82
83
84
85                                                   podman-container-cleanup(1)
Impressum