Then, for general purposes, using mhwd-kernel
is sufficient. I have only used pacman
in specific cases where it’s needed; when headers are required before building a VM app, for example.
Then I ask again, when would it be necessary to use both?
If the answer is “never” then, like cscs mentioned before about not going into detail, why are the pacman commands even there?
I still think it’s fine, if there is a small clarification.
mhwd-kernel uninstalled everything for me, I only had kernel and headers, but the cache is always a leftover.
It also uninstalls my nvidia drivers, so that’s neat.
It usually is not. But both are included because both can work.
Its more likely you want to, for example, just remove the headers and not the kernel and thus you have the example for that.
But maybe some of the language and formatting could be cleaned up.
Just like any other package(s).
pacman doesnt clear out the cache for you on removal either.
(though there are hooks for that in the AUR)
If you want to automate the cache cleaning then look into paccache.timer
.
So I knew it was grabbing dependencies somehow … and I sorta assumed it would be using pacman flags for that … but no … it uses a basic search for, ex linux61
and does pacman -R
for each of those packages. So any package containing linux61
will be placed on the removal string;
for pkg in $(pacman -Qqs "$kernel" | grep -E "^$kernel$|^$kernel-\S+$"); do
pkgremove+=("$pkg")
done
done
pacman -R "${pkgremove[@]}"
(in your case, ex, linux61-nvidia
)