PDA

View Full Version : How do I excluded updating packages with yum?


Artyom
05-25-2009, 01:29 PM
To exclude updating certain packages from being updated by the 'yum update' command, you need to do the following:


Open your /etc/yum.conf file
At the end of the [main] section, append 'exclude=php* kernel*' without quotes. You can add more packages that you do not want to be upgraded.
Save yum.conf file and close


After the modification, your [main] section will look something like this:

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
exclude=php* kernel*

# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h

# Default.
# installonly_limit = 3

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d