Complete the command to remove a Docker image by its ID.
docker image [1] IMAGE_IDThe docker image rm command removes an image by its ID or name.
Complete the command to force remove a Docker image even if it is used by stopped containers.
docker image rm [1] IMAGE_IDThe --force option forces removal of the image even if it is used by stopped containers.
Fix the error in the command to remove all dangling images.
docker image rm $(docker images -f [1] -q)The filter dangling=true selects images not tagged and unused, which can be removed safely.
Fill both blanks to remove all images that are not used by any container.
docker image prune [1] [2]
The -a or --all option removes all unused images, and --force skips confirmation prompts.
Fill both blanks to remove images by name, force removal.
docker image rm [1] [2] IMAGE_NAME
-f and --force both force removal; using both is redundant but allowed. The command removes the image named IMAGE_NAME forcefully.