I\'ve the following images:
alex@alexvps:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
&
Simply you can aadd --force
at the end of the command. Like:
sudo docker rmi --force
To make it more intelligent you can add as:
sudo docker stop $(docker ps | grep | awk '{print $1}')
sudo docker rm $(docker ps | grep | awk '{print $1}')
sudo docker rmi $(docker images | grep | awk '{print $3}') --force
Here in docker ps
$1 is the first column, i.e. the Docker container ID.
And docker images
$3 is the third column, i.e. the Docker image ID.