Docker Clean

From ElectroDragon Wiki
Revision as of 00:56, 8 June 2021 by Chao (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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