📘 Premium Read: Access my best content on Medium member-only articles — deep dives into Java, Spring Boot, Microservices, backend architecture, interview preparation, career advice, and industry-standard best practices.
🎓 Top 15 Udemy Courses (80-90% Discount): My Udemy Courses - Ramesh Fadatare — All my Udemy courses are real-time and project oriented courses.
▶️ Subscribe to My YouTube Channel (176K+ subscribers): Java Guides on YouTube
▶️ For AI, ChatGPT, Web, Tech, and Generative AI, subscribe to another channel: Ramesh Fadatare on YouTube
Why Remove Docker Volumes?
Steps to Remove a Docker Volume
1. List Existing Volumes:
docker volume ls
$ docker volume ls
DRIVER VOLUME NAME
local my_data_volume
local another_data_volume
2. Inspect the Volume:
docker volume inspect VOLUME_NAME
$ docker volume inspect my_data_volume
[
{
"CreatedAt": "2023-08-15T08:50:12Z",
"Driver": "local",
"Labels": {},
"Mountpoint": "/var/lib/docker/volumes/my_data_volume/_data",
"Name": "my_data_volume",
"Options": {},
"Scope": "local"
}
]
3. Removing the Volume:
docker volume rm VOLUME_NAME
$ docker volume rm my_data_volume
my_data_volume
4. Bulk Volume Cleanup:
docker volume prune
$ docker volume prune
WARNING! This will remove all local volumes not used by at least one container.
Are you sure you want to continue? [y/N] y
Deleted Volumes:
another_data_volume
Total reclaimed space: 34MB
Comments
Post a Comment
Leave Comment