How can I exclude a package from yum-cron but not from manual "yum upgrade"?

The previous Jason answer is working for centos 6.x.

For centos 7 and yum-cron package, the config file is /etc/yum/yum-cron.conf. If you wish to exclude some packages from auto-update mechanism, you'll have to add an exclude line, at the bottom of the file, in the base section.

Example :

[base]
exclude = kernel* owncloud* php* httpd*

This will override the yum.conf options, but only in the yum-cron context, which is the goal of this thread.


In /etc/sysconfig/yum-cron, there is an option called YUM_PARAMETER= which you can use to pass yum parameters to. For example:

YUM_PARAMETER="-x mongo*" 

The scope of that parameter seems to be limited to the yum-cron package.

Tags:

Linux

Yum

Mongodb