<p>Is there any kubernetes api or kubectl command to delete older docker images that is lying on the device.</p>
<p>I know we can delete by using docker rm image but i want to do remotely through API.</p>
<p>Any alternative?</p>

<p>The <code>kubelet</code> removes unused images automatically when the docker disk fullness reaches a configurable threshold.</p>
<p>See <a href="https://kubernetes.io/docs/concepts/architecture/garbage-collection/#containers-images" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/architecture/garbage-collection/#containers-images</a> for details on how that works.</p>
<p>There is no API-lead way to forcefully delete an image.</p>
<p>If you really need to manually clean up an image from nodes, you could run a container that connects to the docker daemon and runs <code>docker rmi &lt;image&gt;</code> there, but it smells like an antipattern to me.</p>
