- Red Hat Enterprise Linux (RHEL) 5
- Red Hat Enterprise Linux (RHEL) 6
- Red Hat Enterprise Linux (RHEL) 7
- Red Hat Enterprise Linux (RHEL) 8
- Red Hat Enterprise Linux (RHEL) 9
- Red Hat Satellite
- Red Hat Network
- How do I exclude kernel or other packages from getting updated in Red Hat Enterprise Linux while updating system via yum?
- How do I use the exclude option with yum?
- How to prevent a package from updating while updating system from Satellite Server ?
- How to exclude only 32 bit or 64 bit packages ?
up2datecommand in Red Hat Enterprise Linux 4 excludes kernel updates by default. The
yumin Red Hat Enterprise Linux 5 includes kernel updates by default.
To skip installing or updating kernel or other packages while using the
yumupdate utility in Red Hat Enterprise Linux 5, 6, 7, 8 and 9, use following options:
Temporary solution via Command line:
# yum update --exclude=PACKAGENAME
For example, to exclude all kernel related packages:
# yum update --exclude=kernel*
php name of packages:
# yum update --exclude=gcc,php
To exclude gcc* and php* packages:
# yum update --exclude=gcc* --exclude=php*
- To make permanent changes, edit the
/etc/yum.conffile and following entries to it:
[main] cachedir=/var/cache/yum/$basearch/$releasever keepcache=0 debuglevel=2 logfile=/var/log/yum.log exclude=kernel* redhat-release* <====
NOTE: If there are multiple packages to be excluded, then separate them using a single space or comma. Also, do not add multiple
exclude= lines in the configuration file because
yum only considers the last
To exclude 32 bit packages edit
- Red Hat Enterprise Linux
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.