Remove Images¶
When to Use This Guide¶
Use this guide to delete images you no longer need and reclaim disk space.
Step 1: List Your Images¶
See what you have and how much space each uses.
Step 2: Remove a Specific Image¶
You can also remove by image ID.
Step 3: Clean Up Unused Images¶
Remove images that no longer have a name (often leftovers from rebuilds).
To remove all images not currently used by a container, add -a.
Common Issues¶
"image is being used by running container"
Stop and remove the container first, then remove the image.
"image has dependent child images"
Other images are built on top of it. Remove those first, or use docker image prune -a to clear unused ones.