Home > Blockchain >  how to get the dangling images using crictl
how to get the dangling images using crictl

Time:04-18

how to using crictl to get the dangling images? The server was not install docker right now. is it possible to using crictl to get the dangling images? I have tried to using this command:

crictl images

but could not recognized which images could be remove.

CodePudding user response:

It is not possible to get the dangling images using crictl.Safest and easiest way to clean up dangling images is by using docker.

You can use the $ docker image prune command which allows you to clean up unused images. By default, docker image prune only cleans up dangling imagesBy default, docker image prune only cleans up dangling images.

Try listing your images with crictl images and if you want to remove all unused images run the below command:

crictl rmi --prune

You need a rather current crictl for that. From the help:

$ crictl rmi --help
NAME:
 crictl rmi - Remove one or more images

USAGE:
 crictl rmi [command options] IMAGE-ID [IMAGE-ID...]

OPTIONS:
 --all, -a    Remove all images (default: false)
 --prune, -q  Remove all unused images (default: false)
 --help, -h   show help (default: false)

Refer to the stackpost for more information.

  • Related