Score:0

Remove unnecessary hardware stuff from Server 22.04 for QEMU/KVM

gb flag

I installed Ubuntu Server 22.04 as a guest OS of QEMU/KVM virtual machine. I installed minimal XFCE and a few GUI apps and that is all I use. If I see the disk usage, the "/usr/lib" directory is huge, and I think it contains things that will never be useful for a QEMU virtual machine like AMD-GPU.

Is there any easy way to remove all the hardware stuff that are irrelevant to a VM?

enter image description here

enter image description here

Christian Ehrhardt avatar
sl flag
Images are meant to be bootable on many systems. You can always use `dpkg -S <path-to-file>` to see which package anything belongs to. In this case to `linux-firmware`. Then `apt remove libux-firmware` will tell you what else you'd rip out of your system due to dependencies. Be careful on that, but that should allow top reduce those quite a bit. In this particular case if you installed it as a VM from a cloud image you hopefully already use linux-virtual instead of anytihng using linux-image-generic (which would depend on linux-firmware).
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.