How do I prevent yum from updating a particular RPM?

For certain reasons I have to keep a slightly older version of a particular RPM installed on my box (Fedora 11). The problem is that every time I do a package update yum (or one of its GUI equivalents) wants to update this RPM to the latest version, which is annoying - especially when I update it by mistake.

Is there a way to 'pin' this version so that yum knows to never try and update it?


Solution 1:

In /etc/yum.conf add something like:

[main]
exclude = yourpackage

See man 5 yum.conf for more info.