Celeb Glow
general | March 01, 2026

Using the virsh# command to delete an existing VM

I have a been working on a Centos7 Box with a couple of VMs installed, I know how to use the virsh# command to list, start or powerOff all existing VMs, However, I will like to know how to actually remove the VM with the virsh# command. Is there Such functionality. My problem is that I manually deleted a couple VMs a while ago. But when I use the virsh# command to list all existing VMs, those deleted VMs are appearing on the list as well. Any help will be very much appreciated

1 Answer

You can remove a VM's configuration by using the virsh undefine command. Note that this will not remove any storage unless you pass the arguments to do so, and this will not immediately remove any currently running VMs - they will be converted to transient and later removed after they're stopped.

See also,

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy