How Do I Remove Some Packages From rhn_check List Before Updating

Latest response

When I installed RHEL 6 last year I included the modules required to run an HTTP server.  Since then I have done manual updates to Apache to level 4.2.3, beyond where Red Hat is at the moment.  When I do a yum --check-update I get a number of hits on httpd at lower levels that where I am.  The result is that the httpd server stops working (wrong init.d/httpd, wrong config overwrites the current one, wrong Apache modules selected, etc).

I can't back httpd out because it is a pre-req to a number of other (unrelated, and in some cases unknown to me) programmes.

How can I block yum from updating httpd?  (and some other services in the same situation, like pgsql)

Any help would be appreciated!

John

 

 

 

Responses

You have a few options to deal with this, that I can think of

yum --exclude=httpd\* update

You can also make this more persistent by updating the yum configuration file, or the repo file itself (if you are using a custom repo).

/etc/yum.conf

[main]

exclude httpd*

If you later decide you want to update the package,

yum --disableexcludes=httpd\* update

I wonder if it is possible to be more specific for the update to include the package - I'm not sure if this works, but you could try the following:

yum --disableexcludes=httpd\* update httpd

Thank you James, especially for the very fast response.

The documentation for yum doesn't have the --exclude keyword so I used the long-form method with the yum.conf file.  I think this is probably the "proper" way anyhow, so it will work next time.  Worked perfectly.

Regards,

John

 

 

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.