You need to be running the 5.10 kernel when removing the 5.4 kernel. Maybe you were still running 5.4 when you tried to remove it.
However, it may be a good idea to keep two kernels. If somehow your computer stops responding during a 5.10 kernel upgrade, it would fail to start with the 5.10 kernel, but you can reboot with the 5.4 kernel to rescue the system.
This is why I don’t update the two kernels simultaneously. I first update all packages including kernel 5.10, but skip the kernel 5.4 update. Then I reboot, check if everything works, and then install the update for kernel 5.4.
Once my computer stopped responding during a kernel update (too many programs were running), and afterwards I had to reinstall due to a kernel panic.
Hi, thank you As I said beforehand, currently 5.12.8:
uname -a ; mhwd-kernel -li ; sudo mhwd-kernel -r linux54
Linux xxxx 5.12.8-1-MANJARO #1 SMP PREEMPT Fri May 28 19:32:35 UTC 2021 x86_64 GNU/Linux
Currently running: 5.12.8-1-MANJARO (linux512)
The following kernels are installed in your system:
Fehler: Konnte den Vorgang nicht vorbereiten (Kann Abhängigkeiten nicht erfüllen)
:: Entfernen von linux54 verletzt Abhängigkeit 'linux54', benötigt von linux-lts
Ups, sry for the German error message. It says: “Errror: Could not prepare the operation (Cannot fulfill dependencies) :: Removing of linux54 violates dependency ‘linux54’, required by linux-lts”
I personally try to keep at least 2 kernels: the latest lts (when proven to be working fine for longer time) and the newest release, so at the moment I have 5.12 (working) and 5.10 (just in case).
For a some time I kept 5.4 because 5.10 was burdened with some issues but now that it’s all ironed out, I removed 5.4.
Having 2 kernels is safer, however, in my 8-year experience with Manjaro, I only needed once to switch to a different kernel (due to interrupted kernel update), where I resumed update and then could come back to the current kernel.
Sometimes different kernels are a way to test if some hardware problems are not caused by the kernel version - rarely happens thou.
More important is to have a few system backups than a few kernels, but it’s a good practice on a rolling release, because you can never know.