PDA

View Full Version : [SOLVED] prevent kernel for upgrade



Jagcoxa
14th June 2015, 02:00 PM
Hello

i want to block the upgrade of kernel on my headless server.

The latest info ihave is to put a line in /etc/yum.conf

but yum.conf does not excists in fedora 22

How do i prevent the upgrade of a package?

lsatenstein
14th June 2015, 02:19 PM
Hello

i want to block the upgrade of kernel on my headless server.

The latest info ihave is to put a line in /etc/yum.conf

but yum.conf does not excists in fedora 22

How do i prevent the upgrade of a package?

put the same line within /etc/dnf/dnf.conf

try dnf --help or man dnf for additonal information

PabloTwo
14th June 2015, 02:20 PM
Fedora 22 defaults to usning dnf instead of yum. You can exclude any package from being updated in the same manner as is done in yum.conf. In /etc/dnf/dnf.conf:

exclude=kernel*
See "man dnf.conf"

Jagcoxa
14th June 2015, 05:31 PM
thanks all

preciate it:):):)

feddy
31st January 2017, 01:40 AM
Has this feature just gone out of fashion?


I have /etc/dnf/dnf.conf with the exclude line but dnf update still tries to change my kernel.


cat /etc/dnf/dnf.conf

[main]
exclude=kernel*


It is still in the man page but does not seem to work.

contrariwise, the following does seem to work:


dnf update -x kernel-*


Why isn't dnf.conf working any more?

thx

PabloTwo
31st January 2017, 01:49 AM
Just wondering why there is nothing else in that file? Make sure there is a CR/newline after the exclude= line. Some config files won't process a last line that isn't terminated with a CR/newline.

jazzyjerome
19th October 2017, 05:01 AM
Has this feature just gone out of fashion?


I have /etc/dnf/dnf.conf with the exclude line but dnf update still tries to change my kernel.


cat /etc/dnf/dnf.conf

[main]
exclude=kernel*


It is still in the man page but does not seem to work.

contrariwise, the following does seem to work:


dnf update -x kernel-*


Why isn't dnf.conf working any more?

thx
The dnf update -x kernel-* command does work thanks.

feddy
19th October 2017, 06:57 AM
It is still in the man page but does not seem to work.

It certainly does work, I have that on two systems and updated yesterday.

I recently commented out that line to get a new kernel.

Check for some small error in typing and the extra linefeed as suggested.