Why don't all versions of an RPM show up in group repositories? (Repository Manager 2)

Visit my.sonatype.com for documentation on Nexus Repository version 2.

Update: On December 10, 2015, RedHat released a version of createrepo for RHEL 7 which has a fix for this issue: "0.9 .9-24 - mergerepo: merge package versions from multiple repos. - Related: bug#1178763"

They also released a version for RHEL 6 shortly after that fixes the issue: "0.9.9-23 - mergerepo: merge package versions from multiple repos. - Resolves: bug#1175925"


The "mergerepo" command in createrepo-0.10.1 and earlier eliminates duplicates at the artifact level.  This has the effect of removing all but the latest version of an artifact in the generated metadata. This behavior has been fixed in newer versions of createrepo:


As of this writing (December 9, 2014) neither CentOS/RHEL 6 or CentOS/RHEL 7 has the fix for this.

The good news is that it is just a one line change:

--- a/createrepo/merge.py
+++ b/createrepo/merge.py
@@ -70,7 +70,7 @@ class RepoMergeBase:
         for repo in repos:
             for pkg in repo.sack:
-                others = self.yumbase.pkgSack.searchNevra(name=pkg.name, arch=pkg.arch)
+                others = self.yumbase.pkgSack.searchNevra(pkg.name, pkg.epoch, pkg.version, pkg.release, pkg.arch)
                 # NOTE the above is definitely going to catch other versions which may
                 # be an invalid comparison
                 if len(others) > 1:

So it is easy for you to patch your system to fix this problem.

Alternatively, you can download the latest createrepo here:


And install that on your path in front of your current createrepo/mergerepo executable.

Have more questions? Submit a request


  • 0
    Brian Pang

    I downloaded the package and use the alien.

    sudo apt-get install alien

    sudo alien -d createrepo-0.10.4.tar.gz

    Output: createrepo_0.10.4-2_all.deb


    sudo dpkg -i createrepo_0.10.4-2_all.deb --instdir=/usr/bin --status-fd

    I could not find the createrepo by using "which createrepo"

    If you know the fix, please let  me know.







  • 0
    Peter Lynch

    We are closing this article for comments.

    If you have a support license, please contact us by submitting a support ticket.

    If you do not have a support license, please use our Nexus Users List or our other free support resources.

Article is closed for comments.