Skip to content

Instantly share code, notes, and snippets.

@unclebean
Last active October 15, 2019 14:33
Show Gist options
  • Save unclebean/dc721c0c24c0479016a3c87614018ae8 to your computer and use it in GitHub Desktop.
Save unclebean/dc721c0c24c0479016a3c87614018ae8 to your computer and use it in GitHub Desktop.
remove unused docker images
// remove none image
docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}")
// remove image with dependent child images
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
// show stopped container
docker ps --filter "status=exited"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment