No diskspace in varlibqubes for installing templates

I am trying to install the regular debian-12 template through qvm-template but I’m having the issue that I don’t have enough diskspace in dom0’s file system (varlibqubes) in order to unpack the image. I can successfully download the image but installing it causes me to run out of disk.

Currently I’m using 14/19.5GB in varlibqubes, that is with the debian-12 image downloaded and cached though.

I’m wondering what the solution people suggest is.
I’ve tried to cleanup journalctl’s logs and dnfs cache, neither stores very much.

I looked briefly at the option of resizing varlibqubes to have more space but it looked cumbersome and decently data loss dangerous.

Finally I thought that perhaps I could take a debian-12-minimal installation and install all the packages of debian-12 through apt. However I would need an exhaustive list of packages to install, and it would need to include the qubes specific packages.
Does anyone know where I can find something like that?

Shouldn’t it just be something like

sudo lvresize --size 40G /dev/qubes_dom0/root
sudo resize2fs /dev/mapper/qubes_dom0-root

Quoted from https://qubes.3isec.org/Templates/

Thanks to both of you, I will do a proper backup and then I’ll look at making a temporary lvm volume as discussed here: notes/Installing_Templates_Qubes_4.1.md at master · unman/notes · GitHub

I will try to report back once it’s done if it was a success story or if some tragedy struck.

Those instructions may need to be adjusted for R4.2, because I think qvm-template uses a different directory for temporary files. Somewhere in /var/tmp/

Installing large templates
In 4.2, dom0 is pegged at 20G by default.
This means that you will not be able to install the larger templates, like parrot, without taking some action.
The easiest thing to do is to increase the size of dom0. On a default install you can do this simply enough by:
sudo lvresize --size 40G /dev/qubes_dom0/root
sudo resize2fs /dev/mapper/qubes_dom0-root

https://qubes.3isec.org/Templates/