"yum remove kernel" is a clean and sane way to remove all but not the running kernels
"distribute-command.sh 'yum -y remove kernel'" is used here for years on a ton of machines
why do you think that a *replacement* should come up not support this?
why do you think "we do not care and even allow remove dnf" is sane behavior?
hence that is why whatever calls itself a replacement for yum should *not*
support destroy the running system without whatever *force switch*
I don't like the weird partial functionality of this feature. It is
apparently undocumented---actually, it'd be tricky to document it
because it seems to protect some nebulous set of system facilities
(running kernel, current yum, presumably RPM and runtime libraries;
probably also grub; what else?).