How to remove NuGet Package from server?

It is possible for private NuGet servers. Use the NuGet delete command.

nuget delete MyPackage 1.0

Update: This still doesn't address the OP's issue as it doesn't allow you to reuse the version number, because it's still being locked by the server. There is no safe way to permanently delete a specific version of a package.


Permanently deleting packages is not supported, but you can control how they are listed. (assuming you're talking about nuget.org).

After signing in, in there is additional information on the delete package page. e.g. https://nuget.org/packages/Parser/1.0.0.0/Delete.

Quoting nuget's explanation from the delete package page :

"Why can’t I delete my package? Our policy is to only permanently delete NuGet packages that really need it, such as packages that contain passwords, malicious/harmful code, etc. This policy is very similar to the policies employed by other package managers such as Ruby Gems.

Unlisting the package will remove the package from being available in the NuGet. The package is still available for download as a dependency for three main reasons.

Other packages may depend on that package. Those packages might not necessarily be in this gallery. Ensures that folks using NuGet without committing packages (package restore) will not be broken. Helps ensure that important community owned packages are not mass deleted."

I would suggest unlisting the previous package and bumping the version to 1.0.0.1 after adding the dependency.

Tags:

Package

Nuget