Low Orbit Flux Logo 2 F

Docker How To Delete Volume

We are going to show you how to delete a Docker volume. We also cover deleting multiple or all volumes at once.

Remove a volume:



docker volume rm data-volume1

Remove two volumes:



docker volume rm data-volume1 data-volume2

list volumes:



docker volume ls

List all dangling volumes:



docker volume ls -f dangling=true 

Delete all dangling volumes:



docker volume prune 

Remove container and volumes connected to that container:



docker rm -v test-server1

List only volume IDs:



docker volume ls -q

Remove all volumes:



docker volume rm $( docker volume ls -q )