09-06-2023, 10:24 AM
How to Remove Docker Images?
In order to view all of your Docker images, you can use:
docker images -a
If you want to remove Docker image or a few, you can use this command and list the IMAGE ID as shown here:
docker image rm IMAGE_ID
To remove dangling images that are most recent and untagged, we will use the “docker remove all images” command as shown here:
docker image prune
However, to remove Docker images that are present in existent containers that are also tagged, we can use this:
docker image prune –a
If you wish to remove all images, for example, that may fall under a specific time frame, use the command:
docker image prune -a --filter "until=24h"
If you want to know more about –filter flags, check out the official documentation page.

