Ask Your Question
1

Will dnf remove kernel underneath it self?

asked 2015-07-25 03:14:09 -0500

Marko gravatar image

I'm currently using last and third kernel on dnf list. When new kernel get in updates will dnf remove third kernel from hard drive even if it is actual loaded kernel? If so, how can i make exception without changing /etc/dnf/dnf.conf installonly_limit=3 ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-07-25 11:27:43 -0500

Yes, dnf will remove the running kernel, do read the transaction summaries before continuing. To keep that kernel, and still get updates:

Get a list of available kernels with full name-version-release:

rpm -q *kernel*
kernel-4.2.0-0.rc2.git1.1.fc24.x86_64
kernel-4.2.0-0.rc2.git2.1.fc23.x86_64
kernel-4.2.0-0.rc3.git0.1.fc23.x86_64

Explicitly remove the newer kernels (presumably you know the newer ones aren't good on your system):

dnf remove kernel-4.2.0-0.rc2.git1.1.fc24.x86_64 kernel-4.2.0-0.rc2.git2.1.fc23.x86_64

then you'll have one kernel instead of three, and you can get the newer kernels for testing.

Alternatively, you can use the --exclude option to dnf to exclude a package one time from a transaction.

edit flag offensive delete link more
0

answered 2015-07-25 12:46:37 -0500

NuuN gravatar image

updated 2015-07-25 15:55:18 -0500

man dnf.conf says you use exclude= to prevent modification by dnf. Using @randomuser answer, slightly modified, rpm -q kernel; add the full name of kernel to the list. (Checked the rpmquery string: it did nothing.)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-07-25 03:14:09 -0500

Seen: 997 times

Last updated: Jul 25 '15