3

I need to completely remove KVM from my Ubuntu desktop, but even after removing the kvm packages, when I run the following command:

virsh -c qemu:///system list

it shows:

 Id Name           State
-------------------------

This indicates that KVM is still running.

How do I completely uninstall KVM from my system?

MadMike
  • 4,244
  • 8
  • 28
  • 50
Nam
  • 31
  • 1
  • 1
  • 2

2 Answers2

6

I had installed it via tha following command :

sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

Hence my uninstall command was :

sudo apt-get remove --purge qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

Which worked fine for me.

  • I ran sudo apt-get install qemu-kvm bridge-utils as the other two packages did not have an installation candidate on Ubuntu 22LTS. virsh -c qemu:///system list still produces the same output. – queeg Oct 22 '23 at 22:11
2

After you removed kvm using the following command:

sudo apt-get remove --purge kvm

check if kvm is deleted properly by making sure these three things are deleted:

/etc/kvm
/etc/udev/rules.d/45-kvm.rules
/etc/init.d/kvm

If these are still existing, remove them manually.

Radu Rădeanu
  • 169,590
  • I had the same symptoms as described in the question. Your answer revealed a Package 'kvm' is not installed, so not removed message. – queeg Oct 22 '23 at 22:09