[Yandex Cloud documentation](../../../index.md) > [Yandex Compute Cloud](../../index.md) > [Step-by-step guides](../index.md) > Managing an image > Deleting an image

# Deleting a disk image

{% note warning %}

Deleting a disk image is permanent and cannot be undone, so you cannot recover a deleted image.

{% endnote %}

Deleting an image does not affect the VMs or disks created from that image. They must be deleted separately.

To delete an image:

{% list tabs group=instructions %}

- Management console {#console}

  1. In the management console, select the folder the image belongs to.
  1. Navigate to **Compute Cloud**.
  1. In the left-hand panel, select ![image](../../../_assets/console-icons/layers.svg) **Images**.
  1. In the line with the image, click ![image](../../../_assets/console-icons/ellipsis.svg) and select **Delete**.
  1. In the window that opens, click **Delete**.

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  1. See the description of the CLI commands for deleting images:

     ```bash
     yc compute image delete --help
     ```

  1. Get a list of images in the default folder:

     ```bash
     yc compute image list
     ```
     
     Result:
     
     ```bash
     +----------------------+-------------+--------+-------------+--------+
     |          ID          |    NAME     | FAMILY | PRODUCT IDS | STATUS |
     +----------------------+-------------+--------+-------------+--------+
     | fd8n3spmksqm******** | first-image |        |             | READY  |
     +----------------------+-------------+--------+-------------+--------+
     ```

  1. Select `ID` or `NAME` of the image in question.
  1. Delete the image:

     ```bash
     yc compute image delete \
       --name first-image
     ```

- Terraform {#tf}

  If you do not have Terraform yet, [install it and configure the Yandex Cloud provider](../../../tutorials/infrastructure-management/terraform-quickstart.md#install-terraform).
  
  
  To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), [authenticate](../../../terraform/authentication.md) using the appropriate method.

  To delete an image created with Terraform, follow these steps:
  1. In the command line, go to the folder with the Terraform configuration file.
  1. Delete the resources using this command:

     ```bash
     terraform destroy
     ```

     {% note alert %}

     Terraform will delete all the resources you created in the current configuration, such as clusters, networks, subnets, and VMs.

     {% endnote %}

  1. Type `yes` and press **Enter**.

- API {#api}

  Use the [delete](../../api-ref/Image/delete.md) REST API method for the [Image](../../api-ref/Image/index.md) resource or the [ImageService/Delete](../../api-ref/grpc/Image/delete.md) gRPC API call.

{% endlist %}