Deleting a Docker image from a registry
Written by
Updated at August 29, 2024
Alert
Deleting a Docker image is a deferred action operation: when you delete a Docker image, its layers are physically removed 1 hour later. Information about the total size of the registry is also updated 1 hour later.
To delete a Docker image from the registry, you need the container-registry.images.pusher
role or higher.
Management console
CLI
API
To delete a Docker image:
- Go to the repository to remove the image from:
- Go to the folder page
and select Container Registry. - Open the appropriate registry.
- Open the repository.
- Go to the folder page
- Click the
icon next to the Docker image to delete. - In the menu that opens, click Delete.
- In the window that opens, click Delete.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
To delete a Docker image, use the image ID. You can retrieve the ID by requesting a list of Docker images in the desired registry.
-
Delete the Docker image:
yc container image delete crp9vik7sgec********
-
Make sure the Docker image has been deleted:
yc container image list
Command result:
+----+---------+------+------+-----------------+ | ID | CREATED | NAME | TAGS | COMPRESSED SIZE | +----+---------+------+------+-----------------+ +----+---------+------+------+-----------------+