Deleting a disk

    You can only delete a disk that is not attached to any VM.

    Important

    Deleting a disk is an operation that cannot be canceled or reversed. You cannot restore a deleted disk.

    If you delete a disk, its snapshots are not deleted with it. Snapshots need to be deleted separately.

    To delete a disk:

    1. In the management console, select the folder the disk belongs to.
    2. Click on the Compute Cloud tile.
    3. On the Virtual machines page, go to the Disks tab.
    4. In the row with the appropriate disk, click on the icon image and select the Delete command.
    5. Confirm the deletion.

    The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id flag.

    1. See the description of the CLI's delete disk commands:

      $ yc compute disk delete --help
      
    2. Get a list of disks in the default folder:

      $ yc compute disk list
      +----------------------+--------------+-------------+---------------+--------+----------------------+-------------------------+
      |          ID          |     NAME     |    SIZE     |     ZONE      | STATUS |     INSTANCE IDS     |       DESCRIPTION       |
      +----------------------+--------------+-------------+---------------+--------+----------------------+-------------------------+
      | a7lqgbt0bb9s40tifuhc | first-disk   | 20401094656 | ru-central1-a | READY  | a7lcvu28njbhnkcteb5n |                         |
      | a7lv5j5hm1p1hppprga7 | second-disk  | 21474836480 | ru-central1-a | READY  |                      |                         |
      +----------------------+--------------+-------------+---------------+--------+----------------------+-------------------------+
      
    3. Select the ID or NAME of the necessary disk.

    4. Delete the disk:

      $ yc compute disk delete \
          --name first-disk