DEV Community

Tek Kshetri
Tek Kshetri

Posted on

4 3

Docker remove all image, volume, container

Here I am going to write about removing docker images, volumes and containers. To do so, first of all, you need to shutdown the docker container.

docker-compose down
Enter fullscreen mode Exit fullscreen mode

After that, you can follow following method to remove required things,

# To remove all the containers
docker rm -f $(docker ps -a -q)

# To remove all the docker images
docker rmi -f $(docker images -a -q)

# To remove all the volumes
docker volume rm $(docker volume ls -q)

# To delete everything
docker system prune -a --volumes
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
polterguy profile image
Thomas Hansen β€’

Cool trick :)

Image of Docusign

πŸ› οΈ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Retry later