How to exclude packages from update Red Hat/Centos

Sometimes you only want to update packages without upgrading kernel, there are two ways of doing this:

1. Temporarily
# yum update –exclude=<package_name>
# yum update –exclude=kernel*

2. To make it more permanent edit /etc/yum.conf file and append “exclude” keyword
[main]
cachedir=/var/cache/yum/$basesearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exclude=kernel* redhat-release*

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s