This is more or less a sequence of manual steps, because I don't want to remove volumes I might still need, especially if no containers are using those volumes at the moment.
This is also why I, sometimes, prefer the following over: docker volume prune
.
In situations where I have literally thousands of docker volumes, basically after a long time of not removing any docker volumes, the following comes in handy.
At first I get the 200
(just some number) biggest docker volumes (as root
).
I exclude containers, that contain postgres
or redis
in their names, essentially allowing the removal of all other volatile containers, named and unnamed.