Docker Clean

From ElectroDragon Wiki

Docker Container Clean

Clean all

  • container, images, volumes, network
  • docker rm -f -v $(docker ps -a -q) && docker rmi $(docker images -a -q) && docker volume rm $(docker volume ls -q) && docker network prune

one by one

remove with volumes or not

  • docker rm -f -v $(docker ps -a -q)
  • docker rm -f $(docker ps -a -q)

images, volumes, network


  • docker rmi $(docker images -a -q)
  • docker volume rm $(docker volume ls -q)
  • docker network prune