Remove docker image by id

Find out the docker image id:

docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
latest 51ca54d439f3 4 hours ago 2.14GB

Remove docker image by id:

docker rmi 51ca54d439f3

On a separate note, a couple of docker commands to cleanup dangling images:

docker rm $(docker ps -qa --no-trunc --filter "status=exited")
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)

Leave a comment

Create a free website or blog at WordPress.com.

Up ↑