I may be wrong but if your removing the 5.4 kernel then you should be able to remove linux54-nvidia as well. You should not need it anymore.Just to add if you use Manjaro settings manager to remove the kernel it should remove all dependency’s as well.
Thanks everyone. I am running 6.1 & also have 5.10 as back-up. The only reason I’m concerned about removing linux54-nvidia is what it says about "“base optionally requires linux: bare metal support”. I’m not sure why it’s saying that because I’ve removed kernels in the past - I don’t want to risk breaking my system. Thanks a lot…
Depending on how you do it, dependencies may not be automatically removed.
The easiest way to handle kernels should be through the Manjaro Settings Manager.
To manage kernels using console commands there is a manjaro tool for this:
mhwd-kernel -h
Usage: mhwd-kernel [option]
-h --help Show this help message
-i --install Install a new kernel [kernel(s)] [optional: rmc = remove current kernel]
-l --list List all available kernels
-li --listinstalled List installed kernels
-r --remove Remove a kernel [kernel(s)]
When you get messages like above - simply add the mentioned packages to your command - if you get other required by - repeat until the command
But knowing pacman arguments will help you
$ man pacman
[...]
REMOVE OPTIONS (APPLY TO -R)
-c, --cascade
Remove all target packages, as well as all packages that
depend on one or more target packages. This operation is
recursive and must be used with care, since it can remove
many potentially needed packages.
-n, --nosave
Instructs pacman to ignore file backup designations.
Normally, when a file is removed from the system, the
database is checked to see if the file should be renamed with
a .pacsave extension.
-s, --recursive
Remove each target specified including all of their
dependencies, provided that (A) they are not required by
other packages; and (B) they were not explicitly installed by
the user. This operation is recursive and analogous to a
backwards --sync operation, and it helps keep a clean system
without orphans. If you want to omit condition (B), pass this
option twice.
-u, --unneeded
Removes targets that are not required by any other packages.
This is mostly useful when removing a group without using the
-c option, to avoid breaking any dependencies.
[...]
So by applying options you can make pacman remove everything related to linux54. Always the content of transaction before hitting Enter
$ sudo pacman -R linux54
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing linux54 breaks dependency 'linux54' required by linux54-nvidia
$ sudo pacman -Rns linux54
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing linux54 breaks dependency 'linux54' required by linux54-nvidia
$ sudo pacman -Rnsc linux54
checking dependencies...
:: base optionally requires linux: bare metal support
Package (2) Old Version Net Change
linux54-nvidia 525.89.02-4 -48,33 MiB
linux54 5.4.234-1 -77,13 MiB
Total Removed Size: 125,46 MiB
:: Do you want to remove these packages? [Y/n]
On a side note: one should remember that pacman doesn’t prevent one from - accidently - removing the running kernel - that is not a bug - pacman assumes you know what you are doing