Volumes can be used by one or more containers, and take up space on the Docker host. Volumes are never removed automatically, because to do so could destroy data.
docker volume ls
Prune all volumes
docker volume prune
By default, you are prompted to continue. To bypass the prompt, use the
By default, all unused volumes are removed. You can limit the scope using the
--filter flag. For instance, the following command only removes volumes which are not labelled with the
Prune volumes with filters
docker volume prune --filter "label!=keep"
Other filtering expressions are available. See the
docker volume prune reference for more examples.