• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

qm destroy Command Examples in Linux

by Deepika

The qm destroy command is a command-line tool provided by the QEMU/KVM Virtual Machine Manager that allows users to destroy or delete a virtual machine. When a virtual machine is destroyed, all of its data and configuration settings are deleted from the system, and the resources that were allocated to the virtual machine are released and made available for other uses.

To use qm destroy, users need to specify the ID number of the virtual machine they want to delete. The command will then prompt the user to confirm the deletion, to ensure that they do not accidentally delete a virtual machine that they still need.

qm destroy Command Examples

1. Destroy a specific virtual machine:

# qm destroy {{vm_id}}

2. Destroy all disks that are not explicitly referenced in a specific virtual machine’s configuration:

# qm destroy {{vm_id}} --destroy-unreferenced-disks

3. Destroy a virtual machine and remove from all locations (inventory, backup jobs,high availability managers, etc.):

# qm destroy {{vm_id}} --purge

4. Destroy a specific virtual machine ignoring locks and forcing destroy:

# sudo qm destroy {{vm_id}} --skiplock

Summary

It is important to note that once a virtual machine is destroyed, all of its data is permanently deleted and cannot be recovered. Users should therefore exercise caution when using the qm destroy command, and make sure that they have a backup of any important data or settings before proceeding.

In addition to the qm destroy command, the QEMU/KVM Virtual Machine Manager provides a variety of other commands and features for managing virtual machines, including creating, cloning, modifying, and backing up VMs. More information about qm destroy and other features of the QEMU/KVM Virtual Machine Manager can be found in the project’s documentation at https://pve.proxmox.com/pve-docs/qm.1.html.

Filed Under: Linux

Some more articles you might also be interested in …

  1. Understanding the /etc/skel directory in Linux
  2. dvc fetch: Download DVC tracked files and directories from a remote repository
  3. deborphan: command not found
  4. namei: command not found
  5. Linux Boot Process
  6. rdesktop: command not found
  7. “aws s3 ls” Command Examples
  8. rdesktop Command Examples in Linux
  9. gdb: The GNU Debugger
  10. circup: The CircuitPython library updater

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright