How to delete a docker image

0 votes

A Dockerfile is included in my project to create an image. I've tweaked that Dockerfile and want to verify whether it still works. So I quit my program and used docker image ls -a in Powershell to list all of my Docker images. Using docker rmi -f $(docker images -a -q) and docker image prune -a and  I deleted all unnecessary images.

However, instead of being erased, the image is merely 'untagged':

Untagged: my_image:latest
Untagged: my_image@sha256:16eb92a476be0...

Before attempting to erase the picture, all containers are stopped and removed.
When I restart my application to create a new image, it continues to use the old one:

> docker image ls -a
REPOSITORY                     TAG           IMAGE ID            CREATED      
/my_image                      latest        0d79904a74b0        1 months ago

How can I physically delete the old image so that my app can create a fresh one?

Apr 21, 2022 in Docker by pranav
• 2,590 points
649 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Docker

+1 vote
1 answer

How to push a docker image to a private repository

You need to tag your image correctly ...READ MORE

answered Jul 26, 2018 in Docker by Kalgi
• 52,350 points
2,299 views
+4 votes
4 answers

How to install packages inside a docker Ubuntu image?

Execute the update and the install command ...READ MORE

answered Apr 24, 2019 in Docker by Vismaya
47,362 views
0 votes
1 answer

How do I delete the build cache for a docker image?

You could try this inorder to clean ...READ MORE

answered Jul 3, 2019 in Docker by Sirajul
• 59,230 points
12,672 views
0 votes
1 answer

How to push a docker image onto the Azure Container Registry (ACR)?

Before pushing local Docker image to ACR, ...READ MORE

answered Jul 4, 2019 in Docker by Sirajul
• 59,230 points
5,585 views
0 votes
1 answer
0 votes
1 answer

How to save a Docker image in tar file?

Hi@akhtar, Sometimes we may require to copy an ...READ MORE

answered Sep 28, 2020 in Docker by MD
• 95,460 points
4,518 views
+2 votes
1 answer
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
3,996 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP