github.com/containers/podman/v5@v5.1.0-rc1/docs/source/markdown/podman-volume-prune.1.md (about) 1 % podman-volume-prune 1 2 3 ## NAME 4 podman\-volume\-prune - Remove all unused volumes 5 6 ## SYNOPSIS 7 **podman volume prune** [*options*] 8 9 ## DESCRIPTION 10 11 Removes unused volumes. By default all unused volumes are removed, the **--filter** flag can 12 be used to filter specific volumes. Users are prompted to confirm the removal of all the 13 unused volumes. To bypass the confirmation, use the **--force** flag. 14 15 16 ## OPTIONS 17 18 #### **--filter** 19 20 Provide filter values. 21 22 The *filters* argument format is of `key=value`. If there is more than one *filter*, then pass multiple OPTIONS: **--filter** *foo=bar* **--filter** *bif=baz*. 23 24 Supported filters: 25 26 | Filter | Description | 27 |:-----------:|------------------------------------------------------------------------------------------------------------| 28 | dangling | [Bool] Only remove volumes not referenced by any containers | 29 | driver | [String] Only remove volumes with the given driver | 30 | label | [String] Only remove volumes, with (or without, in the case of label!=[...] is used) the specified labels. | 31 | name | [String] Only remove volume with the given name | 32 | opt | [String] Only remove volumes created with the given options | 33 | scope | [String] Only remove volumes with the given scope | 34 | until | [DateTime] Only remove volumes created before given timestamp. | 35 | after/since | [Volume] Filter by volumes created after the given VOLUME (name or tag) | 36 37 The `label` *filter* accepts two formats. One is the `label`=*key* or `label`=*key*=*value*, which removes volumes with the specified labels. The other format is the `label!`=*key* or `label!`=*key*=*value*, which removes volumes without the specified labels. 38 39 The `until` *filter* can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m) computed relative to the machine’s time. 40 41 #### **--force**, **-f** 42 43 Do not prompt for confirmation. 44 45 #### **--help** 46 47 Print usage statement 48 49 50 ## EXAMPLES 51 52 53 Prune all unused volumes. 54 ``` 55 $ podman volume prune 56 ``` 57 58 Prune all volumes. Note: this command will also remove all containers that are using a volume. 59 ``` 60 $ podman volume prune --force 61 ``` 62 63 Prune all volumes that contain the specified label. 64 ``` 65 $ podman volume prune --filter label=mylabel=mylabelvalue 66 ``` 67 68 ## SEE ALSO 69 **[podman(1)](podman.1.md)**, **[podman-volume(1)](podman-volume.1.md)** 70 71 ## HISTORY 72 November 2018, Originally compiled by Urvashi Mohnani <umohnani@redhat.com>