In order to remove an image or multiple images on your local Docker Desktop, you can make use of the Command Line (or Terminal on macOS) and make use of the docker rm command,
Example:First let us do a docker images -a to see all the images that we have locally,
% docker images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
alpine latest a6215f271958 2 months ago 5.29MB
alpine edge 578ac1b1a970 3 months ago 5.27MB
As you can see I have two Linux Alpine images with tag latest and edge.
Docker remove image command
To docker remove an image, make use of the command, docker images rm <Image ID>
% docker image rm a6215f271958
Untagged: alpine:latest
Untagged: alpine@sha256:bc41182...95ee852a8d9730fc2ad
Deleted: sha256:a6215f271958c...8a6a26b4f6
Deleted: sha256:5d3e3...99f06a9772
Docker remove multiple images at once command
To remove multiple images at once, you can pass multiple Image IDs separated by a space along with the docker image rm command.
Example:% docker image rm a6215f271958 578ac1b1a970
Read more: https://docs.docker.com/engine/reference/commandline/image_rm/
Facing issues? Have Questions? Post them here! I am happy to answer!
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
- Install Docker on Mac using brew cask
- How to know the Docker Sandbox ID of a Container Network?
- How to Rename Docker Image with none TAG and REPOSITORY?
- How to know list of images available on your device
- Docker Alpine Linux and Apache2 Example
- Install Bash on Alpine Linux - Docker
- Docker Run Command Examples - Part 1
- Install the minimal Linux on Docker (only 5 mb Alpine Linux)
- [fix] docker: Error response from daemon: dial unix docker.raw.sock: connect: no such file or directory.
- Install RabbitMQ on Docker
- How to know docker Engine details
- [Fix] Docker Error response from daemon: manifest for :latest not found: manifest unknown
- How to stop and start a docker container
- How to create volume in Docker using Command
- How to know the Docker Engine Version
- [docker] Error response from daemon: No such container
- Install Docker for Mac using Home-brew Cask
- Docker - Incompatible CPU detected - M1/M2 Mac (macOS Sonoma)
- [fix] Docker Desktop App not starting on Mac (macOS)
- Unable to find image docker latest locally
- How to Stop/Cancel/kill docker image pull
- List of what's new in Docker 4.23
- [Docker M1/M2 Mac] qemu-x86_64: Could not open /lib64/ld-linux-x86-64.so.2: No such file or directory AWS CLI
- Install Docker Desktop on M1/M2 Apple Silicon ARM Chip Mac
- Docker - Running in Resource Saver mode
- 33: Python Program to find the current time in India (IST) - Python-Programs
- How to connect Relational and NoSQL databases with Spring Boot - HowTos
- Check If Python pip modules are outdated and New Version is Available - PIP
- Remove Now Playing icon from macOS Big Sur Menu Bar - MacOS
- Android Parsing Data for android-L failed Unsupported major.minor version 51.0 Error - Android
- How to Rename a file using Mac Terminal - MacOS
- Fix SharePoint Error - Unable to Display Named Item - SharePoint
- Read a file using Java 8 Stream - Java