Many old Docker images to clean up / delete?


(bubill) #1
root@ROSchina:~# docker images
REPOSITORY             TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
local_discourse/app    latest              944d31ea2253        3 days ago          1.49 GB
<none>                 <none>              f3a21e6c3cb7        3 days ago          1.482 GB
samsaffron/discourse   1.0.6               818beea55263        3 days ago          1.038 GB
<none>                 <none>              67e0fb42e4e7        4 days ago          1.482 GB
<none>                 <none>              065b6241ff98        4 days ago          1.482 GB
samsaffron/discourse   1.0.5               3a667f60316b        3 weeks ago         1.035 GB
samsaffron/nsenter     latest              8c777453fc88        4 months ago        3.384 MB
samsaffron/discourse   latest              2c6895c78d2a        4 months ago        1.127 GB
samsaffron/discourse   0.2.4               2c6895c78d2a        4 months ago        1.127 GB

There are many docker images who could be delete ?


(Jeff Atwood) #6

I believe the latest Docker has an official command to clean up @falco can you share it here?


(Rafael dos Santos Silva) #7

You can run docker system prune to remove all old stuff from Docker.


#8

On my server docker system prune doesn’t exist (who knows) but instead I could do:

  1. list all images docker images
  2. remove them with docker rmi INSERT_IMAGE_ID_HERE

(Eli the Bearded) #9

That system prune method is only available with more recent versions of Docker. The way you describe is the older manual way. That older way still works, it just is a bit more complicated.