# NXRM OSS 3.13.0-01 : My repodata is not being updated

**URL:** <https://community.sonatype.com/t/nxrm-oss-3-13-0-01-my-repodata-is-not-being-updated/444>\
**Category:** Sonatype Nexus Repository\
**Created:** [August 24, 2018, 11:54am UTC](https://community.sonatype.com/t/nxrm-oss-3-13-0-01-my-repodata-is-not-being-updated/444 "2018-08-24T11:54:45Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![tekknj833](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/tekknj833/32/255_2.png) [@tekknj833](https://community.sonatype.com/u/tekknj833)\
**Post date:** [August 24, 2018, 11:54am UTC](https://community.sonatype.com/t/nxrm-oss-3-13-0-01-my-repodata-is-not-being-updated/444/1 "2018-08-24T11:54:45Z")

</div>

I created a hosted YUM repository. In the build process I pushed a number of RPMs into it. In the initial push, the repodata folder was generated after about 1-2 minutes. From a CentOS VM I ran the YUM client to list the content of the repo. All was good. I updated the version names of my RPM packages and did another push. I waited for about 5 minutes and ran YUM once more from my VM. The new packages were not listed. From the host, I browsed the repo into the repodata folder and I noticed the blob date/time stamps of the items in the folder had not been updated. What can I do to resolve this problem?

---

<div class="post-metadata">

**Author:** ![jstephens](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/jstephens/32/147_2.png) [@jstephens](https://community.sonatype.com/u/jstephens)\
**Post date:** [August 24, 2018, 12:29pm UTC](https://community.sonatype.com/t/nxrm-oss-3-13-0-01-my-repodata-is-not-being-updated/444/2 "2018-08-24T12:29:47Z")

</div>

> [@tekknj833](#):
>
> The new packages were not listed.

Do you mean the packages are not listed when browsing NXRM or when searching via the yum client?

There is a task that you can run to repair the metadata files if something has gone wrong called “Repair - Rebuild Yum repository metadata (repodata)”. I’d be interested to know more about how your repository got into that state though - Did you get any exceptions in your nexus.log file?

---

<div class="post-metadata">

**Author:** ![tekknj833](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/tekknj833/32/255_2.png) [@tekknj833](https://community.sonatype.com/u/tekknj833)\
**Post date:** [August 24, 2018, 12:52pm UTC](https://community.sonatype.com/t/nxrm-oss-3-13-0-01-my-repodata-is-not-being-updated/444/3 "2018-08-24T12:52:11Z")

</div>

When searching for the updates executing [# yum list] at the console window in the VM. I’ll check the log. I setup a repo on CentOS 7 and Windows 7 pro. Same behavior. Executing YUM client will not display any updated packages. I did build a task to repair the metadata. I’m watching to see what happens.

---

<div class="post-metadata">

**Author:** ![jstephens](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/jstephens/32/147_2.png) [@jstephens](https://community.sonatype.com/u/jstephens)\
**Post date:** [August 24, 2018, 1:06pm UTC](https://community.sonatype.com/t/nxrm-oss-3-13-0-01-my-repodata-is-not-being-updated/444/4 "2018-08-24T13:06:39Z")

</div>

We’ve had similar reports in the past and it has been a case of people needing to clear their local Yum cache `yum clean all`. What made me hesitate to suggest that was that you saw the times were not updated on the metadata assets - but worth a try.

---

<div class="post-metadata">

**Author:** ![tekknj833](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/tekknj833/32/255_2.png) [@tekknj833](https://community.sonatype.com/u/tekknj833)\
**Post date:** [August 24, 2018, 1:23pm UTC](https://community.sonatype.com/t/nxrm-oss-3-13-0-01-my-repodata-is-not-being-updated/444/5 "2018-08-24T13:23:44Z")

</div>

I think creating the scheduled task might have done the trick. I’ll do some more testing and monitoring in the next few hours and report back. Thanks for the quick replies.

---

<div class="post-metadata">

**Author:** ![jstephens](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/jstephens/32/147_2.png) [@jstephens](https://community.sonatype.com/u/jstephens)\
**Post date:** [August 24, 2018, 1:54pm UTC](https://community.sonatype.com/t/nxrm-oss-3-13-0-01-my-repodata-is-not-being-updated/444/6 "2018-08-24T13:54:05Z")

</div>

No problem. If that fixes it sounds like a bug in the automated process - if you could file a ticket at [https://issues.sonatype.org/secure/Dashboard.jspa](https://issues.sonatype.org/secure/Dashboard.jspa) and include a support zip by following the instructions here [Support Features](https://help.sonatype.com/repomanager3/configuration/support-features#SupportFeatures-CreatingaSupportZIP) (note: tickets are secure by default and only you and sonatype can see it and the contents of the support zip).

---

<div class="post-metadata">

**Author:** ![tekknj833](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/tekknj833/32/255_2.png) [@tekknj833](https://community.sonatype.com/u/tekknj833)\
**Post date:** [August 24, 2018, 9:28pm UTC](https://community.sonatype.com/t/nxrm-oss-3-13-0-01-my-repodata-is-not-being-updated/444/7 "2018-08-24T21:28:22Z")

</div>

I was too quick to claim success. I set the task schedule to update every 2 minutes. I also push more RPMs into the repo. But nothing updated. I even executed “yum clean && yum makecache” (which I should not have to do) from a console on the VM. Yum is still displaying the old packages. Yes, I’ll submit a ticket.

---

<div class="post-metadata">

**Author:** ![jstephens](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/jstephens/32/147_2.png) [@jstephens](https://community.sonatype.com/u/jstephens)\
**Post date:** [August 25, 2018, 9:51pm UTC](https://community.sonatype.com/t/nxrm-oss-3-13-0-01-my-repodata-is-not-being-updated/444/8 "2018-08-25T21:51:16Z")

</div>

@tekknj833 Another thing to be aware of is [https://issues.sonatype.org/browse/NEXUS-17263](https://issues.sonatype.org/browse/NEXUS-17263) which makes it look like the task has finished before it actually has.

Another thing you can try is disabling the cache option in the task - this will be much slower (depending on how many RPMs you have) but it will rebuild the metadata from scratch by scanning all RPMs in your repository.

---

<div class="post-metadata">

**Author:** ![tekknj833](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/tekknj833/32/255_2.png) [@tekknj833](https://community.sonatype.com/u/tekknj833)\
**Post date:** [August 28, 2018, 9:16pm UTC](https://community.sonatype.com/t/nxrm-oss-3-13-0-01-my-repodata-is-not-being-updated/444/9 "2018-08-28T21:16:03Z")

</div>

I think I figured out something about yum that wasn’t really apparent to me. when I execute ‘yum list’, it displays the packages in columns as: $name.$arch, $version.$release, $repo

When I pushed my updated RPM packages I did not change the name or architecture. On the NX host for example, I would have multiple RPMs and the only difference being the version. I took a guess and deleted the older RPMs. Then waiting for the yum cache to expire on the client. I executed ‘yum list’ and the updated RPMs were displayed.

Is this the proper way that yum works?

I can never see the following:  
mytestrpm.x86\_64 1.2.2-1.el7  
mytestrpm.x86\_64 1.3.3-1.el7 (this is the rpm I expected to see displayed)

But if the architecture value is different then I can see:  
mytestrpm.i686 1.2.2-1.el6  
mytestrpm.x86\_64 1.2.2-1.el7

Last, is there an automated way to clean up older RPMs on the host when updated RPMs arrive?  
Or the trick is to somehow get the NXRM host and yum client to the list latest version. Which I can’t seem to make happen.

---

<div class="post-metadata">

**Author:** ![jstephens](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/jstephens/32/147_2.png) [@jstephens](https://community.sonatype.com/u/jstephens)\
**Post date:** [August 29, 2018, 11:34am UTC](https://community.sonatype.com/t/nxrm-oss-3-13-0-01-my-repodata-is-not-being-updated/444/10 "2018-08-29T11:34:29Z")

</div>

@tekknj833 I’ve just tested this and `yum list` is correctly displaying the latest version of the package I upload. You could take a look in the primary.xml file to check that the version numbers listed are what you expect. You could also try using `yum list available --showduplicates` to show you all versions of available packages.

There is no way to clean up older RPMs when updated RPMs arrive. We are working on a new cleanup feature that will initially be able to delete by age and last downloaded time (likely to be released in the next version) and in a future iteration of this feature we will be adding “keep n versions of packages”.

---

<div class="post-metadata">

**Author:** ![tekknj833](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/tekknj833/32/255_2.png) [@tekknj833](https://community.sonatype.com/u/tekknj833)\
**Post date:** [August 29, 2018, 2:55pm UTC](https://community.sonatype.com/t/nxrm-oss-3-13-0-01-my-repodata-is-not-being-updated/444/11 "2018-08-29T14:55:41Z")

</div>

Thanks. Here’s what I discovered this morning. Running ‘yum clean expire-cache’ appears to resolve my problem. I did add the parameter ‘metadata\_expire=1m’ in my yum.conf but the yum cache just does not keep pace with the revision changes on the host. Seems I have to force the cache update to see the latest revisions of the rpms. In addition, I have a NXRM yum rebuild metadata task running. I now feel confident that the issue lies with yum and not NXRM3.

Additional info:  
Browsing the hosts I have the following rpms.  
mytestrpm.x86\_64 1.2.2-1.el7  
mytestrpm.x86\_64 1.3.3-1.el7  
mytestrpm.x86\_64 1.4.4-1.el7  
mytestrpm.x86\_64 1.5.5-1.el7

When I run ‘yum list available’, I get: mytestrpm.x86\_64 1.5.5-1.el7  
After the NXRM rebuild meta-data task runs and the I run ‘yum clean expire-cache’.

My last experiment was to create a cronjob with ‘yum clean expire-cache’ every hour so the cache stays in sync with the hourly NXRM task. Now when new revisions are published I always see the current rpms on the clients.

---

<div class="post-metadata">

**Author:** ![sverre.moe](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@sverre.moe](https://community.sonatype.com/u/sverre.moe)\
**Post date:** [April 2, 2019, 6:10pm UTC](https://community.sonatype.com/t/nxrm-oss-3-13-0-01-my-repodata-is-not-being-updated/444/12 "2019-04-02T18:10:29Z")

</div>

> [@jstephens](#):
>
> There is no way to clean up older RPMs when updated RPMs arrive. We are working on a new cleanup feature that will initially be able to delete by age and last downloaded time (likely to be released in the next version) and in a future iteration of this feature we will be adding “keep n versions of packages”.

Has this been released, or still on the roadmap?  
Would very much like the “keep n versions of packages” feature.
