Help with deleting rpm from nexus3 yum repo via REST API

I have a new nexus 3 repo on a remote host. I have a yum hosted repo setup. I only have access to the repo itself, not the host. Version is 3.29.2-02

I have uploaded various test repos and a repo depth of 3. In some cases, I have uploaded the exact same rpms to each sub repo. I need to be able to delete an individual rpm.

I have tried:
curl -v -u admin:admin123 -X DELETE http://localhost:8081/repository/yumhosted/foo/bar/my-webapp-1.7-1.noarch.rpm

and the REST API using the proper asset ID.

curl -X DELETE “https://someurl/service/rest/v1/assets/UHJpdmF0ZV9FQlJJU1NfWXVtOjlmMTM0MzRhY2ZlN2VmZjdhY2IzZTZmN2E0ZTExZGZk” -H “accept: application/json”

Both of these result in the following:

  1. successful deletion response via cURL output.
  2. via the web browse UI, the rpm is still there after refresh, even after multiple hours.
  3. via the HTML Index, i now cannot view the directory containing those RPMS at all.
    (url/service/rest/repository/browse/Private_EBRISS_Yum/yum/reponame/el7/RPMS)
    I get the following error when descending into that directory:
    ERROR: (ID 1af9987b-65ab-46a2-b7b3-3b78a85113ef) java.lang.NullPointerException

from the nexus yum documentation, I’d expect either method to work, and update the yum repodata in the process. And I’d expect the web UI to reflect the change.

I’m in the process of setting up a local test instance of nexus3 to see if I get the same error or if it’s a configuration issue on the remote. However, I’d love some suggestions as to any other options, or what I should be expecting to see.

doing a local test with version 3.30, the delete works as expected. So that means it’s some type of error/issue on the hosts end. Any suggestions on what to tell them to look at, or what might be causing this?

Hi Drew,
Please try running Repair - Rebuild repository browse task - it should re-synchronize UI browse nodes with actual component database, so after the task finishes your UI should not be showing any missing component anymore.

is that available via the REST API? or do i have to be logged into the remote host? I don’t think I have seen that option anywhere and I am not allowed to log in as an admin on the host.

is that available via the REST API?

No, unless you have already defined the task beforehand via UI, because the API is incomplete in this regard: https://issues.sonatype.org/browse/NEXUS-21068

do i have to be logged into the remote host?

Yes, to create or run a task you need administrative permissions.

I don’t think I have seen that option anywhere and I am not allowed to log in as an admin on the host.

Unfortunately in that case there’s nothing more you can do other than asking your administrator to run the task for you.