How to delete KVM domain using virsh

Here’s below a quick tutorial which explain how to delete a KVM domain on your server using virsh from the command line

First, double check which domain you’d like to delete

P.S: please note that your KVM domain has to be down.
If it’s not the case, let’s shutdown the domain first

Let say that the domain you want to remove is called mytestserver, so to shutdown this server run the command below

then if you list again the running domain by using

you should not see your domain anymore

Now it is time to make some cleanup 😉

Run this command and you’ll never see the mytestserver domain, including configuration, snapshots, volumes, etc.

You’re done 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to Top