I am unable to delete all my local docker containers or images and below is the error I am getting. Can you please suggest what am I doing wrong ?
docker rmi $(docker ps -a -q)
unknown shorthand flag: 'a' in -a
See 'docker rmi --help'.<\br>
I am unable to delete all my local docker containers or images and below is the error I am getting. Can you please suggest what am I doing wrong ?
docker rmi $(docker ps -a -q)
unknown shorthand flag: 'a' in -a
See 'docker rmi --help'.<\br>
docker ps
is pulling a list of the containers you have, not the images, and rmi
is used for removing images, not containers.
Use docker rm $(docker ps -a -q)
If you want to clean up your docker space, check out the prune
command, for example:
docker system prune
docker image prune
docker container prune