In this config we will show how to remove all docker images located on your docker host system. Let’s start by removing a single image:
# docker rmi IMAGE-ID
The above docker command will remove a single image from your docker host system. To remove a multiple docker images you may supply as an argument multiple docker image ID’s:
# docker rmi IMAGE-ID IMAGE-ID IMAGE-ID
If your intention is to remove all existing docker images the below command will remove all docker images regardless of their count.
Warning: Please note we have also included --force
to remove also images which are in use:
# docker rmi --force `docker images -q`