Tuesday, April 12, 2022

[SOLVED] Control yum update packages sequence

Issue

Couldn't find an answer anywhere so I will try here. Is there a way to tell yum, while running yum update, to update a specific package as the last one? I am not talking about requires / dependencies, It just needs to be updated after all other packages on the system.

In a nutshell, I manage local repositories in my environment and this particular rpm holds the version for each repository, so by updating it as last I can label the client with that particular version.


Solution

You can run two yum commands. First one excluding the .rpm that you don't want to be updated and second, running your usual update.

$ yum --exclude="foo*.rpm" update

If foo*.rpm comes from a particular repository, then during the update, you can disable it using its name. Name of a repository can be found by looking into /etc/yum.repos.d/*.repo file or using the command

$ yum repolist

Then disable the repo and update. Note, this will disable update of all packages coming from this repo.

$ yum --disablerepo="nameOfRepo" update

Finally, run your usual update

$ yum update


Answered By - iamauser
Answer Checked By - Timothy Miller (WPSolving Admin)