<p>Kubernetes Garbage Collection have a option to delete the images when it reached to a certain percentage of disk usages <a href="https://kubernetes.io/docs/concepts/cluster-administration/kubelet-garbage-collection/#image-collection" rel="nofollow noreferrer">Link</a></p>

<p>Is there any way to delete all docker images which is more than three days old and not being used now instead of doing it manually ?</p>

Tutai Kumar Dalal
<p>Follow the below steps</p>

<ol>
<li>Create a shell script to run docker system prune -f. </li>
<li>Build a docker image using the shell script from above</li>
<li>Deploy a cronjob to clean up daily or twice in a day</li>
</ol>
