17/01/2015

[Yum] Prevent packages from being installed or updated

Even though it is recommended to always run the latest software version for bug fixes and security purposes, sometimes the package maintainers might have gotten too many donations and slip up on the next release.

And if that release is a kernel release, things might get ugly. Luckily, you can prevent yum from installing or updating packages by adding the --exclude parameter to your commands:

yum --exclude=PACKAGE update

this will update the system but not the packages named PACKAGE. Its scope is limited to the single command, so a second yum update will not exclude them.

Eg to exclude kernel packages:

yum --exclude=kernel* update

To make the exclusion permanent, edit /etc/yum.conf and add a line:

exclude=PACKAGE

No comments:

Post a Comment

With great power comes great responsibility.

Da grandi poteri derivano grandi responsabilità.