45

I deployed some artifacts and I copy-pasted wrong name of those artifacts. I remember that manual playing with repository content brings problems.

What is the recommended way for dealing with these situations?

EDITED:

I thought there was no way of deleting artifacts from hosted repositories via web interface. Now I see that in the "Browse storage" section I can delete the artifact directory, which is the the recommended way I guess.

Lii
  • 11,553
  • 8
  • 64
  • 88
lisak
  • 21,611
  • 40
  • 152
  • 243

5 Answers5

21

Yup, in the past I've just deleted artifacts using the web GUI, no problems

Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185
  • Problem is that the `.sha1` and `.md5` files are left behind if you don't delete the artifacts through the repository interface. – Marcel Stör Mar 19 '13 at 11:53
  • 1
    and if you delete snapshot versions, they remain listed in maven-metadata.xml for the artifact; if listed as the latest version, trying to retrieve it will give you an error – Cpt. Senkfuss Aug 14 '13 at 15:08
  • 1
    @Dr.Z that problem can be fixed by creating a scheduled job that rebuilds the metadata files. This is the only effective solution to a number of problems related to snapshots. – Mark O'Connor Aug 14 '13 at 17:52
19

login as administrator, delete the artifacts you want to remove, and rebuild index for this repo. delete all artifacts in a repository rebuild index for a repository

Rongrong Luo
  • 392
  • 3
  • 10
6

On my installation (Nexus 3.23, with a Python repository), the "delete component" isn't available in the WebGUI from the browse interface (even logged in as local admin).

However, if you use the "Advanced search" feature and select the desired component/package, then the delete function is available, so it's the only way I found to delete a package.

CharlesB
  • 86,532
  • 28
  • 194
  • 218
  • I found the same. However, I find that deleting components this way leaves the manifests in the repo, even after I do a Rebuild Index via Configuration -> Repositories -> {repository name} -> Rebuild index – fig Apr 15 '21 at 12:22
0

In Nexus 2, you can right-click on the element and select "Delete":

enter image description here

serv-inc
  • 35,772
  • 9
  • 166
  • 188
-2

1)click on settings 2)click on Repositories 3)click on the Repository that you wish to delete 4)click on delete Repository on the top left corner 5)Repository will be deleted

Lazy-Coder
  • 19
  • 2