Docker Useful Commands

By | December 28, 2019

Images

  • List: docker images -a
  • Remove: docker rmi Image Image
  • Remove all images: docker rmi $(docker images -a -q)

Containers

  • List: docker ps -a
  • Remove: docker rm ID_or_Name ID_or_Name
  • Stop all containers: docker stop $(docker ps -a -q)
  • Remove all containers: docker rm $(docker ps -a -q)

Volumes

  • List: docker volume ls
  • Remove: docker volume rm volume_name volume_name

 

Ref: https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes

Leave a Reply

Your email address will not be published. Required fields are marked *