Skip to content

Instantly share code, notes, and snippets.

@MeenachiSundaram
Last active December 24, 2016 12:05
Show Gist options
  • Save MeenachiSundaram/162209a9bd937afa2cb9487168b6662e to your computer and use it in GitHub Desktop.
Save MeenachiSundaram/162209a9bd937afa2cb9487168b6662e to your computer and use it in GitHub Desktop.
Working with docker images
sudo docker ps -a | grep Exit | cut -d ' ' -f 1 | xargs sudo docker rm
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
#You can then remove untagged images if you rebuilt the same version with
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
docker rmi $(docker images -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment