github.com/containers/podman/v5@v5.1.0-rc1/docs/source/markdown/podman-network-prune.1.md (about) 1 % podman-network-prune 1 2 3 ## NAME 4 podman\-network\-prune - Remove all unused networks 5 6 ## SYNOPSIS 7 **podman network prune** [*options*] 8 9 ## DESCRIPTION 10 Remove all unused networks. An unused network is defined by a network which 11 has no containers connected or configured to connect to it. It does not remove 12 the so-called default network which goes by the name of *podman*. 13 14 ## OPTIONS 15 16 #### **--filter** 17 18 Provide filter values. 19 20 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*. 21 22 Supported filters: 23 24 | Filter | Description | 25 |:------:|----------------------------------------------------------------------------------------------------| 26 | label | Only remove networks, with (or without, in the case of label!=[...] is used) the specified labels. | 27 | until | Only remove networks created before given timestamp. | 28 29 The `label` *filter* accepts two formats. One is the `label`=*key* or `label`=*key*=*value*, which removes networks with the specified labels. The other format is the `label!`=*key* or `label!`=*key*=*value*, which removes networks without the specified labels. 30 31 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. 32 33 #### **--force**, **-f** 34 35 Do not prompt for confirmation 36 37 ## EXAMPLE 38 39 Prune networks: 40 ``` 41 podman network prune 42 ``` 43 44 Prune all networks created not created in the last two hours: 45 ``` 46 podman network prune --filter until=2h 47 ``` 48 49 ## SEE ALSO 50 **[podman(1)](podman.1.md)**, **[podman-network(1)](podman-network.1.md)**, **[podman-network-rm(1)](podman-network-rm.1.md)** 51 52 ## HISTORY 53 February 2021, Originally compiled by Brent Baude <bbaude@redhat.com>