Docker Community Forums

Share and learn in the Docker community.

Why I have problems removing images? [solved]


(Dockergi) #1

What are the commands I can use to delete an image?

Why these codes do not work?

I would like to remove only apache_server.

Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. Tutti i diritti sono riservati.

PS C:\Program Files\Docker Toolbox> docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
apache_server       v1                  46373bdfbb63        2 hours ago         132MB
httpd               2.4                 2a51bb06dc8b        2 weeks ago         132MB
PS C:\Program Files\Docker Toolbox> docker stop apache_server:v1
Error response from daemon: No such container: apache_server:v1
PS C:\Program Files\Docker Toolbox> docker stop apache_server
Error response from daemon: No such container: apache_server
PS C:\Program Files\Docker Toolbox> docker stop -t apache_server
invalid argument "apache_server" for "-t, --time" flag: strconv.ParseInt: parsing "apache_server": invalid syntax
See 'docker stop --help'.
PS C:\Program Files\Docker Toolbox> docker rm apache_server:v1
Error: No such container: apache_server:v1
PS C:\Program Files\Docker Toolbox> docker rm --force apache_server:v1
Error: No such container: apache_server:v1
PS C:\Program Files\Docker Toolbox> docker rm --force apache_server
Error: No such container: apache_server
PS C:\Program Files\Docker Toolbox> docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
apache_server       v1                  46373bdfbb63        2 hours ago         132MB
httpd               2.4                 2a51bb06dc8b        2 weeks ago         132MB
PS C:\Program Files\Docker Toolbox>

OS / build version: Windows 8.1
App version: 18.09.0
Steps to reproduce: To see the code on Kitematic (Alpha) I posted


(Martin Terp) #2

Hi :slight_smile:

The command is “docker rmi imagename/id” -for images
and “docker rm containername/id” -for containers


(Dockergi) #3

Thanks for your help!