Forrest logo
back to the docker tool

docker:tldr:9c5f9

docker: Show help.
$ docker rmi
try on your machine

The command "docker rmi" is used to remove one or more Docker images from your local machine. The "rmi" stands for "remove image".

Syntax: docker rmi [OPTIONS] IMAGE [IMAGE...]

  • OPTIONS: Additional options that can be used with the command. For example, you can use the "-f" or "--force" option to forcefully remove the image, even if it is being used by a container.
  • IMAGE: The name or ID of the image(s) you want to remove. You can specify multiple images by separating them with whitespace.

Note: You can use the "docker images" command to list all the images available on your machine and their corresponding IDs and tags.

Example usage:

  1. To remove a single image:

    docker rmi my_image
  2. To remove multiple images:

    docker rmi my_image1 my_image2
  3. To forcefully remove an image:

    docker rmi -f my_image
This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the docker tool