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
12
13
15 podman container cleanup cleans up exited containers by removing all
16 mountpoints and network configuration from the host. The container
17 name or ID can be used. The cleanup command does not remove the con‐
18 tainers. Running containers will not be cleaned up. Sometimes con‐
19 tainer's mount points and network stacks can remain if the podman com‐
20 mand was killed or the container ran in daemon mode. This command is
21 automatically executed when you run containers in daemon mode by the
22 conmon process when the container exits.
23
24
26 --all, -a
27 Cleanup all containers.
28
29
30 --exec=session
31 Clean up an exec session for a single container. Can only be specified
32 if a single container is being cleaned up (conflicts with --all as
33 such). If --rm is not specified, temporary files for the exec session
34 will be cleaned up; if it is, the exec session will be removed from the
35 container. Conflicts with --rmi as the container is not being cleaned
36 up so the image cannot be removed.
37
38
39 --latest, -l
40 Instead of providing the container name or ID, use the last created
41 container. If you use methods other than Podman to run containers such
42 as CRI-O, the last started container could be from either of those
43 methods. (This option is not available with the remote Podman client)
44
45
46 --rm
47 After cleanup, remove the container entirely.
48
49
50 --rmi
51 After cleanup, remove the image entirely.
52
53
55 podman container cleanup mywebserver
56
57
58 podman container cleanup mywebserver myflaskserver 860a4b23
59
60
61 podman container cleanup 860a4b23
62
63
64 podman container cleanup -a
65
66
67 podman container cleanup --latest
68
69
71 podman(1), podman-container(1), conmon(8).
72
73
75 Jun 2018, Originally compiled by Dan Walsh dwalsh@redhat.com
76 ⟨mailto:dwalsh@redhat.com⟩
77
78
79
80 podman-container-cleanup(1)()