Closed christianbur closed 4 years ago
The prune command should take care of it.
You sometimes need to run it a few times, until all relations between images are found and solved.
You can check it by running docker system prune
(or docker images prune
) followed by ´docker images --filter "dangling=true"`.
"docker system prune" is too dangerous for me, because if I am not careful, important things can be deleted.
It does not delete volumes (anymore? It did a while ago).
That's what I'm talking about, if this is fixed, fine. Then we close the ticket.
It only deletes volumes when you append --volumes
https://docs.docker.com/engine/reference/commandline/system_prune/#options
Is your feature request related to a problem? Please describe. if images are updated where REPOSITORY and TAG are equal, the old image is renamed to
REPOSITORY:<none>
. These<none>
images are not cleaned by the update function in the update.sh script.Describe the solution you'd like With the following command you could delete this
<none>
images. If the<none>
images are still used from another container, the command will not delete them.docker images |grep 'mailcow\|nginx\|mariadb\|memcached\|redis\|ipv6nat' |grep "<none>" |awk '{printf "%s\n",$3}' |xargs -I {} sh -c "docker rmi {}"
Additional context The command must be added in this section.