We have already seen and used the volume list command, volume ls, and the inspect command, volume inspect, and I think you should have a good grasp of what these commands do. There are two other commands in the volume-management group, both for volume removal. The first is the volume rm command, which you can use to remove one or more volumes by name. Then, there is the volume prune command; with the prune command, you can remove ALL unused volumes. Be extra careful with the use of this command. Here is the syntax for the remove and prune commands:
# Remove volumes command syntax
Usage: docker volume rm [OPTIONS] VOLUME [VOLUME...]
# Prune volumes command syntax
Usage: docker volume prune [OPTIONS]
Here are some examples of using the remove and prune commands:
Since the in-use-volume volume is mounted in the vol-demo container, it did not get removed with the prune...