2

How to uninstall virsh from Ubuntu 13.10 server. I have already removed libvirt-bin, qemu and kvm but virsh is still running. I used following command to remove libvirt-bin.

apt-get remove --purge libvirt-bin kvm qemu qemu-system-x86
apt-get autoremove
reboot

also tried

apt-get remove virsh 

but didn't work

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package virsh

Thanks,

4
  • Well, package virsh doesn't seem to exist. Maybe you want to uninstall something else?
    – landroni
    Feb 26, 2014 at 7:21
  • It depends how you installed it, do you use a ppa? software center?
    – Wild Man
    Feb 26, 2014 at 7:27
  • @landroni I wanted to remove libvirt and relevant virtualization pacakges.
    – Waqas
    Feb 26, 2014 at 9:32
  • @WildMan I installed libvirt from sources. virsh also got installed with those sources. I have tried to remove them with sudo make uninstall but it is still active
    – Waqas
    Feb 26, 2014 at 9:34

3 Answers 3

9

If you installed all these packages from Synaptic, then you can remove them as follows:

sudo apt-get purge libvirt* kvm qemu*

If however you installed one of these packages from sources (say, virsh), then Synaptic will be of no help. You need to use make uninstall from the build directory.

5
  • I already did that, virsh still running :(
    – Waqas
    Feb 26, 2014 at 13:25
  • Well, show us what you did, and what you got. I haven't seen any clear output from either sudo apt-get purge libvirt* kvm qemu* or make uninstall in the OP.
    – landroni
    Feb 26, 2014 at 13:57
  • 1
    binary of virsh was not removed with sudo make uninstall. #which virsh gave following /usr/bin/virsh Manually removing virsh binary with rm /usr/bin/virsh solved my problem. Thanks eveyone for helping.
    – Waqas
    Feb 27, 2014 at 5:19
  • @Waqas If any of the answers helped, please consider accepting that answer.
    – landroni
    Feb 27, 2014 at 6:20
  • great. just add rm -f /etc/libvirt/
    – acgbox
    Sep 15, 2021 at 19:56
1

binary of virsh was not getting removed with sudo make uninstall.

#which virsh printed following binary

/usr/bin/virsh

Manually removing virsh binary with rm /usr/bin/virsh solved my problem. Thanks eveyone for helping

0

Try

aptitude purge packagename
1
  • aptitude not finding the packages as I have already removed them with apt-get
    – Waqas
    Feb 26, 2014 at 13:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .