How to I prevent Rocky linux from kernel version upgrade?

Add to /etc/dnf/dnf.conf something like this:

exclude=kernel*

you can use something like Ansible to make that change across all your servers by adding it to that file. It will save doing it manually.

1 Like