0

I manage my RHEL 6 / 7 systems with yum pointed at a local repository that is a replica of the official repository from Red Hat.

Other people have installed newer versions of some packages as follows:

rpm -i <package name>-<newer version>-<release number of newer version>.rpm

I would rather they'd give me the .rpm because then I could put it in my repo, run createrepo to rebuild the repo with the newer package version, and then update the package as follows:

yum update <package name>

How may I identify installed packages for which the installed package version-release is newer than the version-release in my repo?

Note that this is the opposite of yum update, which identifies installed packages for which the installed package version-release is older than the version-release in my repo.

1

I think that other than scripting it there's no easy way.

Scripting implies that you grab a list of all installed packages via rpm -qa then fetch what their latest version is from the repository, using repoquery. And compare whether the latter versions are older than the former ones.

To speed this up a bit, you may act upon only packages that appear to be installed other than from repos. So as opposed to comparing versions for all pkgs from rpm -qa, you will use a list from:

yum list installed | grep @/

... which will get the list of packages installed via yum install /path/to/some.rpm

and:

yum list installed | grep installed

... will get the list of packages installed via rpm -i /path/to/rpm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.