mirror of
https://github.com/containers/podman.git
synced 2025-10-25 10:16:43 +08:00
Add podman system prune --external
This just calls GC on the local storage, which will remove any leftover directories from previous containers that are not in the podman db anymore. This is useful primarily for transient store mode, but can also help in the case of an unclean shutdown. Also adds some e2e test to ensure prune --external works. Signed-off-by: Alexander Larsson <alexl@redhat.com>
This commit is contained in:
@ -18,6 +18,15 @@ By default, volumes are not removed to prevent important data from being deleted
|
||||
|
||||
Recursively remove all unused pods, containers, images, networks, and volume data. (Maximum 50 iterations.)
|
||||
|
||||
#### **--external**
|
||||
|
||||
Removes all leftover container storage files from local storage that are not managed by podman. In normal circumstances no such data should exist, but in case of an unclean shutdown the podman database may be corrupted and cause his.
|
||||
|
||||
However, when using transient storage mode, the podman database does not persist. This means containers can will leave the writable layers on disk after a reboot. If you use transient store
|
||||
it it recommended that you run **podman system prune --external** once some time after each boot.
|
||||
|
||||
This option is incompatible with **--all** and **--filter** and drops the default behaviour of removing unused resources.
|
||||
|
||||
#### **--filter**=*filters*
|
||||
|
||||
Provide filter values.
|
||||
|
||||
Reference in New Issue
Block a user