We use RPMS for our packaging and yum to update our environments.

We have an rpm package-5.1.1-3 installed in our production server and in our yum repository we have 2 newer versions such as package-5.1.3-3 and package-5.2-27.

Using yum, we tried to install package-5.1.3-1 but yum installed package-5.2-27.

It caused serious problems in production.

If we remove 5.2-27 package from our custom yum repository and try installing 5.1.3-1, it's installing as expected.

I think yum should allow installation of specific version of RPMS and I remember doing this few times. I tried to debug but no success.

Package already installed:

root@snelloru]# rpm -qa|grep package

Installing higher version(5.1.3-1)

yum install package-5.1.3-1
Loaded plugins: rhnplugin, security
Excluding Packages in global exclude list
Setting up Install Process
Package matching package-5.1.3-1.x86_64 already installed. Checking for update.
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: package = 5.1.1-3 for package: package-database
---> Package package.x86_64 0:5.1.3-1 set to be updated
--> Running transaction check
---> Package package-database.x86_64 0:5.2-23 set to be updated
--> Processing Dependency: package = 5.2-23 for package: package-database
--> Running transaction check
---> Package package.x86_64 0:5.1.3-1 set to be updated
---> Package package.x86_64 0:5.2-23 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

 Package             Arch      Version      Repository    Size
 package             x86_64    5.2-23       repo          22 M
 package-database    x86_64    5.2-23

Output of yum list --showduplicates package package-database

root@snelloru]# yum list --showduplicates package package-database
Loaded plugins: allowdowngrade, security
rightscale-epel                                       |  951 B     00:00
Installed Packages
package.x86_64                        5.1.1-3            installed
package-database.x86_64               5.1.1-3            installed
Available Packages
package.x86_64                        5.1-126            repo
package.x86_64                        5.1.1-3            repo
package.x86_64                        5.1.2-3            repo
package.x86_64                        5.1.3-1            repo
package.x86_64                        5.2-25             repo
package.x86_64                        5.2-26             repo
package.x86_64                        5.2-27             repo
package-database.x86_64               5.1-126            repo
package-database.x86_64               5.1.1-3            repo
package-database.x86_64               5.1.2-3            repo
package-database.x86_64               5.1.3-1            repo
package-database.x86_64               5.2-2              repo
package-database.x86_64               5.2-3              repo
package-database.x86_64               5.2-4              repo
package-database.x86_64               5.2-24             repo
package-database.x86_64               5.2-25             repo
package-database.x86_64               5.2-26             repo
package-database.x86_64               5.2-27             repo

My observation:

If we try to install package of same version which is already installed in the server but with different release number, its working as expected.

For example if we have 5.2-10 installed in the server and if we try to install 5.2-20 its working as expected though we have higher releases like 5.2-25..5.2-28 are present in repo.

Its not working only when we have different version of rpm is installed

Any ideas on this??

  • Did you notice it is clearly stating that package-5.1.3-1 is already installed? – yoonix Jun 25 '14 at 19:11
  • ohh yes, that the problem. Actually 5.1.1-3 was installed. but yum matches that 5.1.1-3 with 5.1.3-1 and says it already installed. I updated my question to avoid confusion. Thanks – Sridhar Jun 25 '14 at 19:16
  • 1
    Gotcha. Yum doesn't allow downgrades by default. There are plugins to allow this behavior but I usually just uninstall the old one first. – yoonix Jun 25 '14 at 19:18
  • What is the result of yum list --showduplicates package package-database – jeffatrackaid Jun 25 '14 at 19:19
  • @jeffatrackaid, added output of yum list --showduplicates to my question description. – Sridhar Jun 25 '14 at 19:57

Your Answer

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

Browse other questions tagged or ask your own question.