You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/markdown/podman-system-prune.1.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,20 +7,28 @@ podman\-system\-prune - Remove all unused pods, containers, images, networks, an
7
7
**podman system prune**[*options*]
8
8
9
9
## DESCRIPTION
10
-
**podman system prune** removes all unused containers (both dangling and unreferenced), pods, networks, and optionally, volumes from local storage.
10
+
**podman system prune** removes all unused containers (both dangling and unreferenced), build containers, pods, networks, and optionally, volumes from local storage.
11
11
12
12
Use the **--all** option to delete all unused images. Unused images are dangling images as well as any image that does not have any containers based on it.
13
13
14
14
By default, volumes are not removed to prevent important data from being deleted if there is currently no container using the volume. Use the **--volumes** flag when running the command to prune volumes as well.
15
15
16
+
By default, build containers are not removed to prevent interference with builds in progress. Use the **--build** flag when running the command to remove build containers as well.
17
+
16
18
## OPTIONS
17
19
#### **--all**, **-a**
18
20
19
21
Recursively remove all unused pods, containers, images, networks, and volume data. (Maximum 50 iterations.)
20
22
23
+
#### **--build**
24
+
25
+
Removes any build containers that were created during the build, but were not removed because the build was unexpectedly terminated.
26
+
27
+
Note: **This is not safe operation and should be executed only when no builds are in progress. It can interfere with builds in progress.**
28
+
21
29
#### **--external**
22
30
23
-
Removes all leftover container storage files from local storage not managed by Podman. In normal circumstances, no such data exists, but in case of an unclean shutdown, the Podman database may be corrupted and cause this.
31
+
Tries to clean up remainders of previous containers or layers that are not references in the storage json files. These can happen in the case of unclean shutdowns or regular restarts in transient storage mode.
24
32
25
33
However, when using transient storage mode, the Podman database does not persist. This means containers leave the writable layers on disk after a reboot. When using a transient store, it is recommended that the **podman system prune --external** command is run during boot.
0 commit comments