Deleting Packages

After publishing a package to a NuGet feed, the NuGet delete command enables a user to delete a package from the server. Note that some NuGet feeds, like the official NuGet gallery at NuGet.org, may not allow package deletion. The reason for this is threefold:

  • Other packages may depend on that package. Those packages might not necessarily be on the same feed.
  • It ensures that folks who are not committing packages (package restore) will not have broken builds.
  • It helps ensure that important community owned packages are not mass deleted.

Here's an example:

nuget delete <package Id> <package version> [API Key] [options]

Available options are shown in Table B-1.

Get Pro NuGet now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.