How does one remove a Docker image?
Asked 07 September, 2021
Viewed 791 times
  • 60
Votes

I'm running Docker under Vagrant under OS X 10.8.4 (Mountain Lion), and whenever I try to delete a saved image, I get an error:

$ docker rmi some-image-id
2013/07/15 hh:mm:ss unexpected JSON input

According to the rmi help, the proper syntax is docker rmi IMAGE [IMAGE...], and I'm not sure what to make of that.

How can I delete an image?

$ docker version
Client version: 0.4.8
Server version: 0.4.8
Go version: go1.1

 

$docker info
Containers: 1
Images: 3

Interestingly, when I run docker ps, no containers show up at all. Running docker images shows four (4) base images and one (1) node image.

19 Answer