vinay s
vinay s

Reputation: 11

To add a Artifacts deleted nupkg

I have permanently deleted a package from Artifacts.

Is there a way to restore it?

Now if I try to push I am getting this error:

Response status code does not indicate success: 409 (Conflict - The version 3.18.1 of Google.Protobuf has been deleted. It cannot be restored or pushed. (DevOps Activity ID: 014272E1-B940-428D-B3DF-4E67E5890D4B))

Upvotes: 1

Views: 940

Answers (1)

Leo Liu
Leo Liu

Reputation: 76740

To add a Artifacts deleted nupkg

I am afraid there is no such way to restore it.

According to the document Understand immutability of packages:

Once you publish a particular version of a package to a feed, that version number is permanently reserved. You cannot upload a newer revision package with that same version number, or delete it and upload a new package at the same version.

That because many package clients, including NuGet, keep a local cache of packages on your machine. Once a client has cached a particular package@version, it will return that copy on future install/restore requests. If, on the server, you replace package@version (rev 1) with a new package@version (rev 2), the client is unable to tell the difference. This can lead to indeterminate build results from different machines.

So we could not overwrite all packages that have already been uploaded, even we could not delete them and re-uploaded. To resolve this issue, you could try to upload the packages with a new version or create a new feed to save the package.

Upvotes: 1

Related Questions