Can't update the system

I wasn’t updating for some time and trying to update it(dom0) right now gives me an error icon

I tried to see the log and it says something like:

  • installing package … 928MB more space on the / filesystem
    for many packages

I tried the dnf clean all in the dom0 and it said:
Cache directory “/home/user/.cache/libdnf5” does not exist. Nothing to clean.

tried also:
df -h /
and it printed out:
size: 20g
used: 17g
avail: 1.9g
use%: 91%

what do I do with this? I have disk space but I dont just want to through it away like that. how do I clean the system and make it work? Obviously I didnt create anything myself inside dom0 so I dont see any reason to increase its size

Hi ailsunmoccasin - and welcome to the forum.

Does it change to do:

sudo dnf clean

?

You can also loo at the number of old kernels you have installed?

:slight_smile:

Ah thanks!

It did clean some 500MB I had and I definitely have lots of old kernels in place but Im a bit afraid to remove them

Is there an absolute safe way to remove old kernels? I have them since I installed Qubes so from 6.18.29.-1.fc41 and I currently use 7.0.12-1.fc41

Hi ailsunmoccasin

Can/will you share the output of:

rpm -qa | grep kernel

from a dom0 terminal?

:slight_smile:

I was about to write it all by hand but it’s too much

Maybe I could learn the pattern though by some example?

I have it like this:
kernel-tools-libs-6.17.10-100.fc41.x86_64
kernel-tools-6.17.10-100.fc41.x86_64
qubes-core-dom0-linux-kernel-install-4.3.21-1.fc41.x86_64
kernel-latest-modules-6.19.5-1.qubes.fc41.x86_64
kernel-latest-devel-6.19.5-1.qubes.fc41.x86_64
kernel-latest-qubes-vm-6.19.5-1.qubes.fc41.x86_64
kernel-latest-6.19.5-1.qubes.fc41.x86_64
qubes-kernel-vm-support-4.3.17-1.fc41.x86_64
kernel-latest-modules-6.19.14-1.qubes.fc41.x86_64
kernel-latest-devel-6.19.14-1.qubes.fc41.x86_64
kernel-latest-qubes-vm-6.19.14-1.qubes.fc41.x86_64
kernel-latest-6.19.14-1.qubes.fc41.x86_64
kernel-modules-6.18.29-1.qubes.fc41.x86_64
…

Try:

Hi ailsunmoccasin

If you run the dom0 terminal inside xfce4-terminal, you can

  • highlight the text you want to copy
  • click Edit → Copy
  • select “Copy dom0 clipboard” (clipboard next to your username at top right corner of your screen)
  • move focus to the place you want to paste it
  • press Ctrl-Shift-v followed by Ctrl-v to paste the text

If you have multiple kernel-latest-X.Y.Z you should check the version you are running atm. (with uname -a ) and select to remove one of the others with:

rpm -qa | grep kernel-latest | grep X.Y.Z | xargs
sudo dnf remove kernel-modules-X.Y.Z-1.qubes.fc41.x86_64 kernel-devel-X.Y.Z-1.qubes.fc41.x86_64 kernel-qubes-vm-X.Y.Z-1.qubes.fc41.x86_64 kernel-X.Y.Z-1.qubes.fc41.x86_64

Since you will be removing a kernel, check the packages dnf wants to remove twice, before removing them!

The alternative to removing packages, is to expand the filesystem for dom0 – for that, see the link from @WhiteShadow

:slight_smile:

Hi @ailsunmoccasin,

After sudo dnf clean, I often get a win from testing sudo du -s /var/log/journal

The result is the number of kb used for the systemd journal. It is where dom0 stores most of its log output.

If it is big, then sudo journalctl --vacuum-time=1d will delete everything, except for the most recent one day. Many other --vacuum options are available. man journalctl is your friend.

You are so helpful! Thank you so much!

I actually did remove the older kernels myself as I needed it at that moment but I did it one by one and was very afraid Im going to break something

I had no idea! life changing! :smiley:

So useful THANK YOU

I did however find that there is something like:
kernel-tools-6.17.10-100.fc41.x86_64
and the
kernel-tools-libs-6.17.10-100.fc41.x86_64

Can I safely remove these too as they for the 6.17.10 version or is it used for something?

Thank you so much!
I had it over 1GB

Hi ailsunmoccasin

Those files belongs to the kernel line of kernels .. I tried/attempted to target the kernel-latest line of kernels for clean up .. but I see that my sudo dnf remove was based on the kernel line

kernel-modules-X.Y.Z-1.qubes.fc41.x86_64

and not kernel-latest

kernel-latest-modules-X.Y.Z-1.qubes.fc41.x86_64

– nice catch!! :slight_smile:

As long as you keep the kernel you are using (probably the latest of kernel and/or kernel-latest) is should be safe to remove old versions.

Note that one of the kernel-qubes-vms is probably the version used for your Qubes - so you could check what version your sys-net and sys-firewall is using (so you can download a kernel, if you discover that you need them!) and see if it differs from the dom0 version. If they differs keep both the version for dom0 and the version for sys-net/sys-firewall! :wink:

:slight_smile: