Which kernels can I delete here?

kernel-6.18.35-1.qubes. fc41.x86_64
kernel-devel-6.18.35-1.qubes. fc41.x86_64
kernel-latest-6.19.14-1.qubes. fc41.x86_64
kernel-latest-7.0.12-1.qubes. fc41.x86_64
kernel-latest-7.0.14-1.qubes. fc41.x86_64
kernel-latest-devel-6.19.14-1.qubes.fc41.x86_64
kernel-latest-devel-7.0.12-1.qubes. fc41.x86_64
kernel-latest-devel-7.0.14-1.qubes. fc41.x86_64
kernel-latest-modules-6.19.14-1.qubes. fc41.x86_64
kernel-latest-modules-7.0.12-1.qubes. fc41.x86_64
kernel-latest-modules-7.0.14-1.qubes. fc41.x86_64
kernel-latest-qubes-vm-6.19.14-1.qubes.fc41.x86_64
kernel-latest-qubes-vm-7.0.12-1.qubes. fc41.x86_64
kernel-latest-qubes-vm-7.0.14-1.qubes. fc41.x86_64
kernel-modules-6.18.31-1.qubes.fc41.x86_64
kernel-modules-6.18.35-1.qubes.fc41.x86_64
kernel-qubes-vm-6.18.31-1.qubes. fc41.x86_64
kernel-qubes-vm-6.18.35-1.qubes. fc41.x86_64

You can remove these kernels, because they are duplicates with old versions
kernel-latest-6.19.14-1.qubes. fc41.x86_64
kernel-latest-7.0.12-1.qubes. fc41.x86_64
kernel-latest-devel-6.19.14-1.qubes.fc41.x86_64
kernel-latest-devel-7.0.12-1.qubes. fc41.x86_64
kernel-latest-modules-6.19.14-1.qubes. fc41.x86_64
kernel-latest-modules-7.0.12-1.qubes. fc41.x86_64
kernel-latest-qubes-vm-6.19.14-1.qubes.fc41.x86_64
kernel-latest-qubes-vm-7.0.12-1.qubes. fc41.x86_64
kernel-modules-6.18.31-1.qubes.fc41.x86_64
kernel-qubes-vm-6.18.31-1.qubes. fc41.x86_64

I’d recommend keeping at least a few old versions around. The standard
is to keep 3, but you might want to keep just one older kernel.

Why do this? A new kernel may introduce issues or instabilities that
affect your machine. If this happens, the simplest solution is to use
the GRUB menu to load the old version that you kept - presumably working
without issues.

3 Likes

I only have 6.9 GB of free disk space left on Dom0; 64% is used.

What else can I delete from the folder below?
I think the Dom0 disk space should be increased.

0 /home/qubes/.ICEauthority
4 /home/qubes/.bash_logout
4 /home/qubes/.bash_profile
4 /home/qubes/.bashrc
4 /home/qubes/Documents
4 /home/qubes/Downloads
4 /home/qubes/Music
4 /home/qubes/0ffentlich
4 /home/qubes/Videos
4 /home/qubes/Vorlagen
8 /home/qubes/.gnupg
8 /home/qubes/Qubes Incoming
12 /home/qubes/.bash_history
16 /home/qubes/Schreibtisch
40 /home/qubes/Pictures
252 /home/qubes/.xsession-errors .old
944 /home/qubes/.xsession-errors
2268 — /home/qubes/.config
14344 —/home/qubes/.cache
115684 /home/qubes/.local

I had to delete a lot of items in the “Qubes Template Manager” just to be able to install the latest Dom0 update.

Instead of micromanaging dom0 files to eke out a little bit of space it’s much easier to expand the LVM storage for dom0 and then the filesystem on it, e.g. from the 20 GiB default to 40 GiB:

2 Likes

Here is how qubes upgrade manager does this: qubes-core-admin-linux/vmupdate/agent/source/apt/apt_cli.py at 582536ccd95d759c82e189102a50404b8c41d114 · QubesOS/qubes-core-admin-linux · GitHub

Translated to bash, it would look sth like this:

obsolete_kernels=()
autoremove_plan="$(apt-get autoremove -s)"
while read -r action package _rest; do
    if [[ "$action" == "Remv" && "$package" == linux-image* ]]; then
        obsolete_kernels+=("$package")
    fi
done <<< "$autoremove_plan"

if (( ${#obsolete_kernels[@]} )); then
    apt-get remove -y "${obsolete_kernels[@]}"
fi