How do i remove virt-manager and all it's components?

Hello
lately i see Libvirt related errors in the journal log,and since i don’t use it anymore i’d like to completely remove it.
what would be the correct way of doing it?

i installed it using the following command:

sudo pacman -S virt-manager qemu vde2 ebtables dnsmasq edk2-ovmf

so is it just

sudo pacman -R virt-manager qemu vde2 ebtables dnsmasq edk2-ovmf

?
is it safe to use sudo pacman -Rsu ?

and what about the libvirtd.service ,should i disable it before or after removing those packages?

Exactly.

That’s up to you whether you want to recursively remove unused dependencies. I do it regularly. See man pacman.

You can, especially if you aren’t going to reboot for awhile.

1 Like

Thanks,
I’m looking for the remove command to remove also the dependencies that these programs installed and are only used by them,
i don’t want to break anything.
i looked around and saw it might be pacman -Rs ?

also, are orphans not used dependencies ?

You won’t. Using -s, --recursive

…helps keep a clean system without orphans.

Using -u, --unneeded as well …

…is mostly useful when removing a group without using the -c option,
to avoid breaking any dependencies.

Yes.

1 Like

Thank you.

Edit:
what do you think of that?:

sudo pacman -Rsu virt-manager qemu vde2 ebtables dnsmasq edk2-ovmf
checking dependencies...
**:: networkmanager optionally requires dnsmasq: connection sharing**
**:: virtualbox optionally requires vde2: Virtual Distributed Ethernet support**

Packages (26) brltty-6.3-2  dtc-1.6.0-3  gtk-vnc-1.2.0-1  gtksourceview4-4.8.1-1  libcacard-2.7.0-2  libosinfo-1.9.0-1
              libslirp-4.4.0-1  libspeechd-0.10.2-1  libvirt-1:7.1.0-3  libvirt-glib-4.0.0-1  libvirt-python-1:7.1.0-1
              numactl-2.0.14-1  osinfo-db-20210426-1  phodav-2.5-1  seabios-1.14.0-1  spice-0.14.3-3  spice-gtk-0.39-3
              usbredir-0.9.0-1  virglrenderer-0.8.2-1  virt-install-3.2.0-1  dnsmasq-2.85-1  ebtables-2.0.10_4-8
              edk2-ovmf-202102-1  qemu-6.0.0-2  vde2-2.3.2-16  virt-manager-3.2.0-1

it seem this command doesn’t consider optional dependencies.
i think i’ll keep vde2 and remove dnsmask.

:wink: I’d vote for doing it the other way around
keep dnsmasq
… it’s not a big deal though - you can always reinstall it even without network since it is in the pacman cache
… not a big deal in terms of storage space either … a few kilobytes …

1 Like

then i’ll keep both since i regularly use virtualbox.

why would i need dnsmask,i installed it for virt-manager?

edit:
it’s done

There is a –print option.

Only print the targets instead of performing the actual operation (sync, remove or upgrade)

Some tools call it dry-run, test, simulate.

1 Like