Introduction
Another article about how to use docker command. Specifically, the command execution in this case will be in a device with Microsoft Windows as its operating system. So, the first thing which is very important is to have the Docker application exist in the device. In order to have the Docker application, it is important to have it throughout an installation first. As an example, in order to have Docker application available through the installation process, it use Docker Desktop application installer. Just visit the page providing information about it in this link. Specifically, in order to download the 64-bit version installer of Docker Desktop application installer Microsoft Windows operating system, just visit this link.
How to Delete Image Docker Container using docker Command
So, this part will show the sequence action for deleting image docker image using ‘docker’ command :
-
As usual, the first step will be checking the Docker application service whether it is running or not. In this context, it is the Docker Desktop application service. Normally, if it is running, it will be available as background process where the icon exist in the task bar. Click it, see if it is actually running. If it is not running, then try to run the Docker Desktop application. In that case, it will also run the Docker Desktop Service. Another way is just to check the Services list of the Windows operating system. In other words, just check if the status of the Docker Desktop Service in the list is running or not.
-
Next step, just run the Command Prompt.
-
In the command prompt, before deleting the docker image exist in local, first of all just try to list the docker image available locally. As a reference, try to look the article in this link with the title of ‘How to List Docker Image using docker Command in Microsoft Windows’. It describes about how to list the local docker image available. For an example, the following is the command for listing the available docker image exist locally :
C:\User\Personal>docker image list --all REPOSITORY TAG IMAGE ID CREATED SIZE wordpress latest 21b1833683d3 2 days ago 609MB mysql 5.7 7ccb2b64de3b 4 days ago 462MB C:\User\Personal>
- So, how is to delete those images using the docker command ?. Following the above docker command execution, just type the following command in order to delete those images :
C:\User\Personal>docker image prune --all --force Deleted Images: untagged: mysql:5.7 untagged: mysql@sha256:7815f2f82a78eb5e5ebccf6ec6352d94691faf1232e80335ab36a4dfdc0b6723 deleted: sha256:7ccb2b64de3bb87f1e22a3d808d0d6750ddb74f16e98510c3b41cb910d7c4202 deleted: sha256:8ee8dbf5971f706e2fa18e92fe681e35075c565bf86bb934bc101a3135605f2d deleted: sha256:76e97b830d3e300d4b1db782a77ade4123db38c96c536597585d5bf86b8eb093 deleted: sha256:31b06d3211cd278c5f51411f57678783181d990be2cad29fb93a6ccdf9e58103 deleted: sha256:2dfc45a2fa416c9a9d8e5eca5507872dce078db1512d7a88d97bfd77381b2e3c deleted: sha256:dcf540992968905f3438e7501a12d0611838e3d3caaa20825d9e6d563f673e62 deleted: sha256:60be3170bc434f37a72650733e6aeded244caca00a3e26e861f34b2cbaa2f929 deleted: sha256:0df6aacada966ced14045a888d90c35add50f5570b7cb2514443c8259b84f7b0 deleted: sha256:b2bef848a7a96226ac5ef5b353969b59aac696e1bbf193cb48a93b20bcdc943d deleted: sha256:b4bab32bc9b5428316c93f55e033d052b99c202fab743399fc6343cd6bbd12fe deleted: sha256:9bd0f840c2881cd90012b2b0333086dcd94d7683bd55bc4ea4a7beb9a96efafb deleted: sha256:6be90f1a2d3f1eb115203b6adb2ce1014fab9a9f8f1b2afa31343397063603d3 untagged: wordpress:latest untagged: wordpress@sha256:145b6abd55656cd9061f717141d299fb80de11d1290042b56b5ef42cbdf74498 deleted: sha256:21b1833683d39d1753295a3e186486926e867b38fbf8c9e51da957d4bbe98b15 deleted: sha256:101c0e0228247fd2175a673989fb726bb4413a4e4a3c83ad952beb78fffeac8b deleted: sha256:7b1aca2db32a05d570543f4d28e4ac9b5a64c713da313611d64760d3e225a0bd deleted: sha256:aeb7f1cdd668456af3ad93b8312b145a9d75719ace371cc47b96449086cd2262 deleted: sha256:c69bcaeb6e53bd274f146641408ea07f4ed84af3155bffd71208daf8dc3f5bbe deleted: sha256:af4df35af77051ee401ae37ba59d830ed35b0dbec06986d5a0f6c0af82283426 deleted: sha256:378fa321d30af0a9b96165182be25cd38a43ef17be9058f89cfce9f09e73d0b0 deleted: sha256:0c70a43f48bb23721edbe9cfc931acba4bd8d549df9a31561c3e5061977f96ed deleted: sha256:ff01940d126cd76f5fcc0a1aa4b7ba5afd256fb000ab6b22698686ad412bee03 deleted: sha256:6c8d771ff68170f4e88a01c25364332c6927f7d3d6c0c4816f595a94e06a1ce5 deleted: sha256:27e912c5bceada2758a2ba8b71f00929cbf21a1bfd1773d37841d1553dac0157 deleted: sha256:a8f538ada52cfcc4561b8cbdcab16f4ef53ae5a21f3958110f01ca41cfeff1ff deleted: sha256:575bb1ddf1eb8002d6ce69216cbbb1cfe6d54c58613ea760b73f20263e6ba2e2 deleted: sha256:62393a19fded813a26c3707ea03dbaa4120518da1d8f20a00f8137281ebbe99f deleted: sha256:70f1bd703605ec8d13ca98515614d2a14e330c0006f125d3b30141e35ba3ff64 deleted: sha256:a3a3e0e5900157cdf87b8e49963f1192e41fc5bee80f510c7f5db1d8c0f918b7 deleted: sha256:f6943d88f3a10b25e5d37690196d2a889ad24315f8a9e3013befb5f8a01af388 deleted: sha256:b201b5dc3726907d5ff8895ffc4d280af8e496aea100cf22536c0699e1788ea0 deleted: sha256:bb5e7a892aa5bb521c52ebdbbabc498d4cf1cbadbfdc3eb9859978a88b2bc5bb deleted: sha256:0fc164e1f88f1c17c2b8ed1eae553835606cdda0050f9e725914963d17c51cdd deleted: sha256:0489f41634bcd1f757c91991e1fe4d0b3acc879957012aa1147f56b5d530fdb3 deleted: sha256:fd95118eade99a75b949f634a0994e0f0732ff18c2573fabdfc8d4f95b092f0e Total reclaimed space: 1.071GB C:\User\Personal>
One thought on “How to Delete Docker Image using docker Command in Microsoft Windows”