RHEL Remove Old Kernels: Difference between revisions

From UNIX Systems Administration
Jump to navigation Jump to search
 
Line 5: Line 5:
#: ex. <tt>'''# package-cleanup --oldkernels --count=1'''</tt>
#: ex. <tt>'''# package-cleanup --oldkernels --count=1'''</tt>


== CentOS 8 ==
== RHEL 8/CentOS 8 ==
=== Remove Old Kernels ===
=== Remove Old Kernels ===
# List all Repositories
# List all Repositories
#: <tt>'''# dnf remove --oldinstallonly --setopt install_only_limit=<#> kernel'''</tt>
#: <tt>'''# dnf remove --oldinstallonly --setopt install_only_limit=<#> kernel'''</tt>
#: ex. <tt>'''# dnf remove --oldinstallonly --setopt install_only_limit=1 kernel'''</tt>
#: ex. <tt>'''# dnf remove --oldinstallonly --setopt install_only_limit=1 kernel'''</tt>

Latest revision as of 01:47, 3 November 2021

RHEL 7/CentOS 7

Remove Old Kernels

  1. List all Repositories
    # package-cleanup --oldkernels --count=<#>
    ex. # package-cleanup --oldkernels --count=1

RHEL 8/CentOS 8

Remove Old Kernels

  1. List all Repositories
    # dnf remove --oldinstallonly --setopt install_only_limit=<#> kernel
    ex. # dnf remove --oldinstallonly --setopt install_only_limit=1 kernel