Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Can't delete a package from commandline



  • Repro steps:

    • upload a package to ProGet default feed
    • execute the following command:

    NuGet.exe delete TestPackage 1.0.0 <api_key> -Source <nuget_feed_url> -Verbosity detailed

    Expected result: if the user has required permissions (Feeds_DeletePackage) the package should be successfully deleted from ProGet

    Actual result:

    c:\TEMP\test_proget>NuGet.exe delete TestPackage 1.0.0 <api_key> -Source <nuget_feed_url> -Verbosity detailed

    TestPackage 1.0.0 will be deleted from the '<nuget_feed_url>'. Would you like to continue? (y/N) y
    Deleting TestPackage 1.0.0 from the '<nuget_feed_url>'.
    DELETE <nuget_feed_url>/TestPackage/1.0.0
    System.InvalidOperationException: Failed to process request. 'Not Found'.
    The remote server returned an error: (404) Not Found.. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.
    at System.Net.HttpWebRequest.GetResponse()
    at NuGet.RequestHelper.GetResponse(Func`1 createRequest, Action`1 prepareRequest, IProxyCache proxyCache, ICredentialCache credentialCache, ICredentialProvider credentialProvider)
    at NuGet.HttpClient.GetResponse()
    at NuGet.PackageServer.EnsureSuccessfulResponse(HttpClient client, Nullable`1 expectedStatusCode)
    --- End of inner exception stack trace ---
    at NuGet.PackageServer.EnsureSuccessfulResponse(HttpClient client, Nullable`1 expectedStatusCode)
    at NuGet.PackageServer.DeletePackageFromServer(String apiKey, String packageId, String packageVersion)
    at NuGet.PackageServer.DeletePackage(String apiKey, String packageId, String packageVersion)
    at NuGet.Commands.DeleteCommand.ExecuteCommand()
    at NuGet.Commands.Command.Execute()
    at NuGet.Program.Main(String[] args)


  • Hi Manuel,

    The delete option was never implemented mainly because we never thought anyone would use it :) We can add the functionality to the next maintenance release (v2.1.5).

    If you have enterprise support let us know via email (support@inedo.com) and we can implement it for you sooner.



  • We actually have two use cases for delete:

    • maintenance scripts (we have beta packages published for each commit so we need to perform periodically cleanup)
    • automatic validation of new ProGet releases (so we can quickly "validate" a new release before move it into production)

    I know they aren't common use cases but it will be useful.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation