I am trying to delete a docker container by this command:
docker rmi
Obviously, I have replaced the Image-Id by the Id I get u
If the goal is to reclaim disk space, another approach not yet mentioned is to use docker system prune. It will print a warning which should be heeded:
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all dangling images
- all dangling build cache
This will not delete named images, but will purge intermediate unnamed images. Depending on the sizes of containers you're using, this can save a considerable amount of disk space.