Removing kernels via GUI (Manjaro settings manager) leaves an orphan preset in mkinitcpio.d

agreed! removing kernels should leave the user with at least the old configuration file. looks like manjaro-settings-manager uses mhwd-kernel in the background and mhwd-kernel only has one way to remove a kernel using -r option.

-r executes pacman -R "${pkgremove[@]}" (line 82 of /usr/bin/mhwd-kernel. just -R doesn’t save configs and doesn’t even clean the leftovers. for saving configs -Rn should be used. see pacman - ArchWiki.

now this issue was noticed by an old user and they even created a pr to address it. but “manjaro devs” don’t like prs (old experience) and it was, unfortunately, never implemented.