Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
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
      • Managing maintenance of GPU VMs
      • Deleting a VM
    • Enabling a software-accelerated network
    • Viewing operations on service resources
    • Viewing metrics in Monitoring
    • NVIDIA driver update guide
  • Yandex Container Solution
  • Access management
  • Pricing policy
  • Terraform reference
  • Metrics Monitoring
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. Managing a VM
  3. Deleting a network interface from a VM

Deleting a network interface from a VM

Written by
Yandex Cloud
Updated at June 15, 2026
View in Markdown

A virtual machine supports up to eight network interfaces. You can delete network interfaces you no longer need on both stopped and running VMs.

Note

Still, you cannot delete a VM's network interface if it is the only one it has.

To delete a network interface from a VM:

CLI
API

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

The folder used by default is the one specified when creating 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 command for deleting a network interface from a VM:

    yc compute instance detach-network-interface --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 |
    +----------------------+-----------------+---------------+---------+----------------------+
    

    Save the ID of the VM from which you want to delete a network interface.

  3. Stop the selected VM if needed by specifying its ID:

    Note

    The feature of adding and removing network interfaces on running VMs is at the Preview stage. To access the feature, contact support.

    yc compute instance stop <VM_ID>
    
  4. Get a list of network interfaces for the selected VM by specifying its ID:

    yc compute instance get <VM_ID>
    

    Result:

    ...
    network_interfaces:
      - index: "0"
        mac_address: d0:0d:1a:**:**:**
        subnet_id: e2lrucutusnd********
        primary_v4_address:
          address: 192.168.1.20
          one_to_one_nat:
            address: 158.***.**.***
            ip_version: IPV4
        security_group_ids:
          - enpuatgvejtn********
      - index: "1"
        mac_address: d0:1d:1a:**:**:**
        subnet_id: e2lpp96bvvgp********
        primary_v4_address:
          address: 192.168.2.3
        security_group_ids:
          - enpuatgvejtn********
          - enpg8d2hqh1o********
      - index: "2"
        mac_address: d0:2d:1a:**:**:**
        subnet_id: e2lv9c6aek1d********
        primary_v4_address:
          address: 192.168.4.17
        security_group_ids:
          - enpuatgvejtn********
          - enpg8d2hqh1o********
    ...
    

    Save the number (the index field value) of the network interface you want to delete.

  5. Delete the network interface:

    yc compute instance detach-network-interface \
      --id <VM_ID> \
      --network-interface-index <network_interface_number>
    

    Where:

    • --id: ID of the selected VM. Instead of the ID, you can use the --name parameter to specify the VM name.
    • --network-interface-index: Previously saved number of the VM's network interface you need to delete.

    Result:

    ...
    network_interfaces:
      - index: "0"
        mac_address: d0:0d:1a:**:**:**
        subnet_id: e2lrucutusnd********
        primary_v4_address:
          address: 192.168.1.20
          one_to_one_nat:
            address: 158.***.**.***
            ip_version: IPV4
        security_group_ids:
          - enpuatgvejtn********
      - index: "1"
        mac_address: d0:1d:1a:**:**:**
        subnet_id: e2lpp96bvvgp********
        primary_v4_address:
          address: 192.168.2.3
        security_group_ids:
          - enpuatgvejtn********
          - enpg8d2hqh1o********
    ...
    

Use the detachNetworkInterface REST API method for the Instance resource or the InstanceService/DetachNetworkInterface gRPC API call.

Was the article helpful?

Previous
Adding another network interface to a VM
Next
Assigning a public IP address to a VM
© 2026 Direct Cursus Technology L.L.C.