Skip to content

Instantly share code, notes, and snippets.

@gh0st026
Created September 25, 2018 08:30
Show Gist options
  • Save gh0st026/31d07709b839152eb1bb61789287e139 to your computer and use it in GitHub Desktop.
Save gh0st026/31d07709b839152eb1bb61789287e139 to your computer and use it in GitHub Desktop.
Removes everything from docker. Containers, volumes, networks, images etc.
sudo docker stop $(sudo docker ps -aq)
sudo docker rm $(sudo docker ps -aq)
sudo docker network prune -f
sudo docker rmi -f $(sudo docker images --filter dangling=true -qa)
sudo docker volume rm $(sudo docker volume ls --filter dangling=true -q)
sudo docker rmi -f $(sudo docker images -qa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment