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
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Backup
  • Getting started
    • All guides
    • Activating the service
      • Creating a backup
      • Restoring a VM or BareMetal server from a backup
      • Restoring a VM or BareMetal server from a backup of another VM or BareMetal server
      • Restoring individual directories and files from a backup
      • Viewing the parameters of backup disks and partitions
      • Deleting a backup
      • Deleting all backups of a VM or BareMetal server
    • Viewing service resource operations
    • Viewing backup statistics
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • Troubleshooting
  1. Step-by-step guides
  2. Backups
  3. Deleting all backups of a VM or BareMetal server

Deleting all backups of a VM or BareMetal server

Written by
Yandex Cloud
Updated at May 13, 2025

If you need to delete all backups of a VM or BareMetal server, the faster and more effective way to delete them as a whole archive rather than separately. This way, you can save time and avoid possible errors.

To delete the backup archive of a VM or BareMetal server:

CLI

If you do not have the Yandex Cloud (CLI) command line interface yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

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

    yc backup backup batch-delete --help
    
  2. Get a list of all backup archives in the default folder:

    yc backup backup list-archives
    

    Result:

    +--------------------------------------+-------------+----------------------+--------------------------------------------------------------------------------------+--------+---------------------+---------------------+------------------------+
    |                  ID                  | RESOURCE ID |     INSTANCE ID      |                                         NAME                                         |  SIZE  |     CREATED AT      |     UPDATED AT      | LAST BACKUP CREATED AT |
    +--------------------------------------+-------------+----------------------+--------------------------------------------------------------------------------------+--------+---------------------+---------------------+------------------------+
    | d8322308-fc11-833a-6b52-ca63******** |             | epd73glhmkr0******** | second-vm-579CFEB6-A557-4922-AACD-697FADED0529-40DC750F-057C-41FD-8AAE-D485A******** | 6.0 GB | 2025-03-02 15:33:44 | 0001-01-01 00:00:00 | 2025-03-02 16:07:13    |
    | 4508faa1-3372-542e-f73a-cccf******** |             | epdolbm6ijmt******** | backup-vm-579CFEB6-A557-4922-AACD-697FADED0529-86A93494-96F7-4168-A44C-0A969******** | 9.3 GB | 2025-03-02 14:13:46 | 0001-01-01 00:00:00 | 2025-03-02 16:07:16    |
    +--------------------------------------+-------------+----------------------+--------------------------------------------------------------------------------------+--------+---------------------+---------------------+------------------------+
    

    Note

    You can request a list of backup archives for a specific VM or BareMetal server:

    yc backup backup list-archives --instance-id <VM_or_BareMetal_server_ID>
    

    However, this command will provide an output in case the VM or server you specified has not been deleted, i.e., it is still there and connected to Cloud Backup.

  3. Delete the backup archive:

    • You can delete the archive by specifying its ID:

      yc backup backup batch-delete \
        --archive-id <archive_ID>
      

      Where --archive-id is the ID of the backup archive you need to delete.

    • You can delete the archive by specifying the IDs of the VM or server and the backup policy:

      yc backup backup batch-delete \
        --instance-id <VM_or_BareMetal_server_ID> \
        --policy-id <policy_ID>
      

      Where:

      • --instance-id: ID of the VM or BareMetal server whose backups you need to delete. When using the --instance-id parameter, you must specify the --policy-id parameter as well.
      • --policy-id: ID of the backup policy on which the backups you need to delete were based. When using the --policy-id parameter, you must specify the --instance-id parameter as well.

The archive deletion will remove all backups of the VM or BareMetal server stored in that archive.

Note

If backups for a VM or BareMetal server were based on a variety of backup policies, you also need to delete other VM or server archives created under such policies.

See alsoSee also

  • Delete backup

Was the article helpful?

Previous
Deleting a backup
Next
Viewing service resource operations
© 2025 Direct Cursus Technology L.L.C.