Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Compute Cloud
    • All guides
      • Stopping and starting a VM
      • Resetting a Windows Server VM user password
      • Attaching a disk to a VM
      • Detaching a disk from a VM
      • Moving a VM to a different availability zone
      • Moving a VM to a different folder
      • Moving a VM to a different cloud
      • Adding another network interface to a VM
      • Deleting a network interface from a VM
      • Assigning a public IP address to a VM
      • Unassigning a public IP address from a VM
      • Making a VM public IP address static
      • Reassigning a public IP address from one VM to another
      • Updating the VM internal IP address
      • Updating a VM
      • Changing VM computing resources
      • Changing VM security groups
      • VM maintenance policy management
      • Configuring VM access permissions
      • Linking a service account to a VM
      • Deleting a VM
    • Viewing service resource operations
  • Yandex Container Solution
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. Managing a VM
  3. Deleting a VM

Deleting a VM

Written by
Yandex Cloud
Updated at May 26, 2025

Warning

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

When selecting a disk to attach to your VM, you can specify whether to delete that disk when deleting the VM. You can enable this option when creating or updating a VM, or when attaching a new disk to it.

Disks attached to a VM prior to its deletion will automatically be detached. The disk data will be preserved, and you will be able to attach these disks to another VM when needed.

Management console
CLI
Terraform
API
  1. In the management console, select the folder the VM belongs to.

  2. Select Compute Cloud.

  3. In the line with the VM, click and select Delete.

    To delete multiple VMs, select them from the list and click Delete at the bottom of the screen.

  4. In the window that opens, click Delete.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

  1. See the description of the CLI command for deleting a VM:

    yc compute instance delete --help
    
  2. Get a list of VMs in the default folder:

    yc compute instance list
    

    Result:

    +----------------------+-----------------+---------------+---------+----------------------+
    |          ID          |       NAME      |    ZONE ID    | STATUS  |     DESCRIPTION      |
    +----------------------+-----------------+---------------+---------+----------------------+
    | fhm0b28lgfp4******** | first-instance  | ru-central1-a | RUNNING | my first vm via CLI  |
    | fhm9gk85nj7g******** | second-instance | ru-central1-a | RUNNING | my second vm via CLI |
    +----------------------+-----------------+---------------+---------+----------------------+
    
  3. Select ID or NAME of the VM, e.g., first-instance.

  4. Delete the VM:

    yc compute instance delete first-instance
    

If you do not have Terraform yet, install it and configure its Yandex Cloud provider.

To delete a VM created using Terraform, follow these steps:

  1. In the command line, go to the directory with the Terraform configuration file.

  2. Delete the resources using this command:

    terraform destroy
    

    Alert

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

  3. Type yes and press Enter.

Use the delete REST API method for the Instance resource or the InstanceService/Delete gRPC API call.

Was the article helpful?

Previous
Linking a service account to a VM
Next
Configuring metadata service parameters
Yandex project
© 2025 Yandex.Cloud LLC