Removing old kernels

Issues related to applications and software problems and general support
Post Reply
afernandezody
Posts: 19
Joined: 2019/06/25 13:10:33

Removing old kernels

Post by afernandezody » 2019/10/23 23:22:20

Hello,
I'm trying to clean my old kernels as:

Code: Select all

sudo package-cleanup --oldkernels --count=1 -y
package-cleanup has to be executed with one of the options: --dupes, --leaves, --orphans, --problems or --cleandupes
The command works with CentOS 7 but returns the above error message with CentOS 8. Any suggestion on how to proceed in CentOS 8? Thanks.

User avatar
TrevorH
Forum Moderator
Posts: 27127
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Removing old kernels

Post by TrevorH » 2019/10/24 00:28:25

From reading the man page for package-cleanup in el8, it appears that most of its current functionality just maps on to different dnf commands. I went reading the man page for dnf and the best I could come up with is dnf remove --oldinstallonly --setopt installonly_limit=2
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

afernandezody
Posts: 19
Joined: 2019/06/25 13:10:33

Re: Removing old kernels

Post by afernandezody » 2019/10/24 21:21:47

Hi TrevorH,
Thanks. It feels a little bit like switching back to Fedora.

Post Reply

Return to “CentOS 8 - General Support”