Warning: the minimal templates are intended only for advanced users. To understand why, read the following:
Original message: Recently, I found a way to reduce debian-12-minimal template even more, so I thought I should share the info for those who may consider it useful. Here is how to do it.
This guide also works for debian-13-minimal
Packages
It is possible to remove the following non-essential packages (apt-get autopurge them).
debian-12-minimal
aptitude
cpio
cron
cron-daemon-common
debconf-i18n
eatmydata
fdisk
gnupg
gpgv
haveged
ifupdown
iproute2
iputils-ping
isc-dhcp-client
isc-dhcp-common
less
libbpf1
libcap2-bin
libglib2.0-bin
libglib2.0-data
libjansson4
libmnl0
libnewt0.52
libnftables1
libnftnl11
libregexp-ipv6-perl
libtext-charwidth-perl
libxtables12
logrotate
mawk
nano
netbase
nftables
perl
perl-modules-5.36
tasksel
vim-common
vim-tiny
whiptail
xterm
debian-13-minimal
apt-transport-https
apt-utils
cpio
cron
cron-daemon-common
debconf-i18n
dhcpcd-base
eatmydata
fdisk
gnupg
ifupdown
iproute2
iputils-ping
less
libcap2-bin
libeatmydata1
libfdisk1
libgcrypt20
libidn2-0
libjansson4
libk5crypto3
libkeyutils1
libkrb5support0
libmnl0
libnewt0.52
libp11-kit0
libsemanage-common
libsepol2
libslang2
libtext-iconv-perl
libtirpc-common
libxtables12
linux-sysctl-defaults
logrotate
nano
nftables
perl
tasksel
vim-common
vim-tiny
whiptail
xterm
Notes
After that, the administrative tasks, e.g. installing software, can be done through qvm-console-dispvm.
It is important to note that if the template will be used for networking AppVMs, netbase must be installed (qubes-core-agent-networking will not work without it). It is not required in the template itself (for package installation).
Reduce RAM usage
For non-networked qubes, it is also possible to deactivate unnecessary network services:
root@debian-minimal-template# systemctl mask systemd-networkd.service
root@debian-minimal-template# systemctl mask systemd-networkd.socket
root@debian-minimal-template# systemctl mask systemd-networkd-wait-online.service
For headless service VMs, which don’t need audio or graphics stuff, disable audiovm and guivm:
user@dom0$ qvm-prefs <your-qube> audiovm ''
user@dom0$ qvm-prefs <your-qube> guivm ''
In this case, qvm-run will need to be run with the --no-gui option.
Additionally, you can even disable unused kernel modules, e.g. sound-related:
root@debian-minimal-template$ cat << EOF | tee /etc/modprobe.d/blacklist.conf
blacklist snd
blacklist snd_pcm
blacklist snd_timer
blacklist soundcore
blacklist pcspkr
blacklist snd_pcsp
EOF
The result
After rebooting the template, its RAM usage is 144 MiB only.
The AppVMs use about 100 MiB more.