1podman-system-prune(1) General Commands Manual podman-system-prune(1)
2
3
4
6 podman-system-prune - Remove all unused pods, containers, images, net‐
7 works, and volume data
8
9
11 podman system prune [options]
12
13
15 podman system prune removes all unused containers (both dangling and
16 unreferenced), pods, networks, and optionally, volumes from local stor‐
17 age.
18
19
20 With the --all option, you can delete all unused images. Unused images
21 are dangling images as well as any image that does not have any con‐
22 tainers based on it.
23
24
25 By default, volumes are not removed to prevent important data from be‐
26 ing deleted if there is currently no container using the volume. Use
27 the --volumes flag when running the command to prune volumes as well.
28
29
31 --all, -a
32 Recursively remove all unused pods, containers, images, networks, and
33 volume data. (Maximum 50 iterations.)
34
35
36 --filter=filters
37 Provide filter values.
38
39
40 The filters argument format is of key=value. If there is more than one
41 filter, then pass multiple OPTIONS: --filter foo=bar --filter bif=baz.
42
43
44 Supported filters:
45
46
47 ┌───────┬────────────────────────────┐
48 │Filter │ Description │
49 ├───────┼────────────────────────────┤
50 │label │ Only remove containers and │
51 │ │ images, with (or without, │
52 │ │ in the case of la‐ │
53 │ │ bel!=[...] is used) the │
54 │ │ specified labels. │
55 ├───────┼────────────────────────────┤
56 │until │ Only remove containers and │
57 │ │ images created before │
58 │ │ given timestamp. │
59 └───────┴────────────────────────────┘
60
61 The label filter accepts two formats. One is the label=key or la‐
62 bel=key=value, which removes containers and images with the specified
63 labels. The other format is the label!=key or label!=key=value, which
64 removes containers and images without the specified labels.
65
66
67 The until filter can be Unix timestamps, date formatted timestamps, or
68 Go duration strings (e.g. 10m, 1h30m) computed relative to the ma‐
69 chine’s time.
70
71
72 --force, -f
73 Do not prompt for confirmation
74
75
76 --help, -h
77 Print usage statement
78
79
80 --volumes
81 Prune volumes currently unused by any container
82
83
85 podman(1), podman-system(1)
86
87
89 February 2019, Originally compiled by Dan Walsh (dwalsh at redhat dot
90 com) December 2020, converted filter information from docs.docker.com
91 documentation by Dan Walsh (dwalsh at redhat dot com)
92
93
94
95 podman-system-prune(1)