Skip to content

Instantly share code, notes, and snippets.

@kyleparisi
Last active December 19, 2018 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyleparisi/937e04bf12af22898e73e2d7f29a1f33 to your computer and use it in GitHub Desktop.
Save kyleparisi/937e04bf12af22898e73e2d7f29a1f33 to your computer and use it in GitHub Desktop.
# Forcefully remove images that don't have tags
docker rmi -f $(docker images | grep "<none>" | awk '{print $3}')
# Remove dead and exited containers
docker ps --filter status=dead --filter status=exited -aq \
| xargs docker rm -v
# Remove images that have dependent children
docker image prune -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment