podman-network-prune(1)
π podman-network-prune β bestie's guide to yeeting unused networks
Okay so real talk, this is the podman-network-prune manual page from the General Commands Manual, and it's literally just here to help you clean up. Let's get into it β¨
πΈ NAME πΈ
podman-network-prune β remove all unused networks (yes, all of them, bye π)
π¦ SYNOPSIS π¦
podman network prune [options]
That's it, that's the whole thing. No positional args, no drama, just vibes and options π
π DESCRIPTION π
So what this does is it removes all unused networks. And like, what even is an "unused network"? Glad you asked, bestie β the manpage defines it as a network which has no containers connected or configured to connect to it. Nobody's using it, nobody's planning to use it, it's giving ghost town energy π»
One big ol' exception though: it does not remove the so-called default network, the one that goes by the name of podman. That one's the main character and it stays. periodt π
β¨ OPTIONS β¨
--filterβ provide filter values. That's the whole idea. More on how below π--force,-fβ do not prompt for confirmation. Live fast, prune without asking, no cap π
π the --filter situation (it's giving detail)
Okay so --filter needs a little more explaining, because there's rules.
If there's more than one filter, you gotta pass the --filter option multiple times, like this:
--filter label=test --filter until=10m
Supported filters, bestie:
labelβ only remove networks with (or without, in the case oflabel!=[...]being used) the specified labels.untilβ only remove networks created before the given timestamp.
Now for the label filter, there are two formats you can use:
label=keyorlabel=key=valueβ this one removes networks with the specified labels.label!=keyorlabel!=key=valueβ this one removes networks without the specified labels. Note the sneaky!β it flips the whole thing π
And the until filter? It accepts:
- Unix timestamps
- date formatted timestamps
- Go duration strings (e.g.
10m,1h30m) β and these are computed relative to the machine's time β°
π EXAMPLE π
Prune networks:
podman network prune
Prune all networks created not created in the last two hours (yes, that's the original wording, and honestly? iconic):
podman network prune --filter until=2h
π SEE ALSO π
Go read those too, they're the friend group π«
π HISTORY π
February 2021, originally compiled by Brent Baude bbaude@redhat.com β¨mailto:bbaude@redhat.comβ© β shoutout to Brent for writing this down so the rest of us could thrive π«Ά
that's the whole page, bestie β this was podman-network-prune(1) from the General Commands Manual, source/version and date and all, and you ate it up π
β¨
π¦ where this page comes from
- arch rolling: podman 6.1.4-1 Β· Apache-2.0
- centos-stream 10: podman 7:6.1.0-2.el10 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- nixpkgs unstable: podman 6.1.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms