Publish unlisted NuGet package
Asked Answered
R

1

20

I want to publish a new version of a NuGet package, but I want it automatically in an Unlisted status. When I manually upload the .nupkg file to nuget.org, in the preview there is an option to unlist the package from search results:


package visibility option on nuget


Is there a way to do that with nuget.exe or dotnet nuget?

I was able to use PUSH + DELETE commands to achieve this, but I'm not sure this is the same as the above manual action.
For instance, one of the concerns is what happens to the package's RSS (atom.xml)?
Does it first get a new entry which is then deleted later on? In which case, is it possible that someone would still get notified about this release?

Last, I am aware of private NuGet feeds, but regardless, I would still like to use just the main NuGet, for convenience's sake.

Rerun answered 28/1, 2020 at 10:22 Comment(1)
Still curious if there is an answer for this, specifically using dotnet packBeing
L
1

I believe you can do this, but it will appear on the feed briefly. Anyone who sees an update notification or has access to the link can have access.

dotnet nuget push foo.nupkg -k 4003d786-cc37-4004-bfdf-c4f3e8ef9b3a -s https://api.nuget.org/v3/index.json
dotnet nuget delete Microsoft.AspNetCore.Mvc 1.0 --non-interactive

gist to unlist all versions of a NuGet package dotnet push documentation
dotnet delete documentation

Lehman answered 22/6 at 19:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.