LinuxCommandLibrary

docker-rmi

remove Docker images from local storage

TLDR

Remove an image

$ docker rmi [image]
copy
Remove multiple images
$ docker rmi [image1] [image2]
copy
Force remove
$ docker rmi -f [image]
copy
Remove all dangling images
$ docker rmi $(docker images -f dangling=true -q)
copy
Remove by image ID
$ docker rmi [image_id]
copy

SYNOPSIS

docker rmi [options] image [image...]

DESCRIPTION

docker rmi removes one or more images. Images in use by containers cannot be removed unless forced. Shorthand for docker image rm. Removing an image deletes all its layers unless they're shared with other images. Dangling images are untagged images that are no longer referenced by any tagged image.

PARAMETERS

-f, --force

Force removal.
--no-prune
Do not delete untagged parent images.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community