1podman-container-cleanup(1)() podman-container-cleanup(1)()
2
3
4
6 podman-container-cleanup - Cleanup the container's network and mount‐
7 points
8
9
11 podman container cleanup [options] container [container ...]
12
13
15 podman container cleanup cleans up exited containers by removing all
16 mountpoints and network configuration from the host. The container name
17 or ID can be used. The cleanup command does not remove the containers.
18 Running containers will not be 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
26 --all, -a
27 Cleanup 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. Can only be specified
35 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 will be cleaned up; if it is, the exec session will be removed from the
38 container.
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. If other methods than Podman are used to run containers such
46 as CRI-O, the last started container could be from either of those
47 methods.
48 The default is false.
49 IMPORTANT: This OPTION is not available with the remote Podman client.
50 This OPTION does not need a container name or ID as input argument.
51
52
53 --rm
54 After cleanup, remove the container entirely.
55 The default is false.
56
57
58 --rmi
59 After cleanup, remove the image entirely.
60 The default is false.
61
62
64 Cleanup the container "mywebserver".
65
66
67 $ podman container cleanup mywebserver
68
69
70
71 Cleanup the containers with the names "mywebserver", "myflaskserver",
72 "860a4b23".
73
74
75 $ podman container cleanup mywebserver myflaskserver 860a4b23
76
77
78
80 podman(1), podman-container(1), conmon(8)
81
82
84 Jun 2018, Originally compiled by Dan Walsh dwalsh@redhat.com
85 ⟨mailto:dwalsh@redhat.com⟩
86
87
88
89 podman-container-cleanup(1)()