Skip to content

Instantly share code, notes, and snippets.

@shhider
Last active June 13, 2023 11:25
Show Gist options
  • Save shhider/97d94daf5f02a3c153abdc535520c7cc to your computer and use it in GitHub Desktop.
Save shhider/97d94daf5f02a3c153abdc535520c7cc to your computer and use it in GitHub Desktop.
clear <none> tag images in Docker
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
# if you got: "docker rmi" requires at least 1 argument.
# That means you don't have useless <none> images,
# maybe you can remove useless containers before.
# after 1.25, you can use the follow cmd.
# https://docs.docker.com/engine/reference/commandline/image_prune/
docker image prune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment