Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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 package using nuget.exe

    Scheduled Pinned Locked Moved Support
    progetnuget
    4 Posts 2 Posters 269 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      I have the latest version of proget. I have in the past used nuget.exe to delete packages from my feeds. This no longer works. (though it does report success in one of the examples)
      Two examples of how I'm trying to delete:

      $ ./nuget.exe delete My.Nuget.Package 8888.8888.6244 deleter:deleter -Source http://my.nuget.server -verbosity detailed

      NuGet Version: 4.7.0.5104
      My.Nuget.Package 8888.8888.6244 will be deleted from the 'http://my.nuget.server'. Would you like to continue? (y/N) y

      WARNING: Deleting My.Nuget.Package 8888.8888.6244 from the 'http://my.nuget.server'.
      DELETE http://my.nuget.server/api/v2/package/My.Nuget.Package/8888.8888.6244
      OK http://my.nuget.server/api/v2/package/My.Nuget.Package/8888.8888.6244 60ms
      My.Nuget.Package 8888.8888.6244 was deleted successfully.

      (This was not deleted successfully. Still exists on the server)

      $ ./nuget.exe delete My.Nuget.Package 8888.8888.6244 deleter:deleter -Source http://my.nuget.server:81 -verbosity detailed

      NuGet Version: 4.7.0.5104
      My.Nuget.Package 8888.8888.6244 will be deleted from the 'http://my.nuget.server:81'. Would you like to continue? (y/N) y

      WARNING: Deleting My.Nuget.Package 8888.8888.6244 from the 'http://my.nuget.server:81'.
      DELETE http://my.nuget.server:81/api/v2/package/My.Nuget.Package/8888.8888.6244
      NotFound http://my.nuget.server:81/api/v2/package/My.Nuget.Package/8888.8888.6244 28ms
      Response status code does not indicate success: 404 (Not Found).
      System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
      at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
      at NuGet.Protocol.Core.Types.PackageUpdateResource.<>c.<DeletePackageFromServer>b__22_1(HttpResponseMessage response)
      at NuGet.Protocol.HttpSource.<ProcessResponseAsync>d__18`1.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at NuGet.Protocol.Core.Types.PackageUpdateResource.<DeletePackageFromServer>d__22.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at NuGet.Protocol.Core.Types.PackageUpdateResource.<DeletePackage>d__21.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at NuGet.Protocol.Core.Types.PackageUpdateResource.<Delete>d__11.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at NuGet.Commands.DeleteRunner.<Run>d__0.MoveNext()
      --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at NuGet.CommandLine.DeleteCommand.<ExecuteCommandAsync>d__16.MoveNext()

      Notice the only difference between the two commands is using a port number at the end of the URL. Example is using a user for the APIKEY that has rights to delete. nuget.exe is using an "api/v2" path to attempt deletion, from what I can see, that doesn't exist. I've also tried to use "http://my.nuget.server:81/feeds/feedname" as the -Source, with and without the port number, and get the same results. In previous version, 4,x,x, using the port number was what worked properly.

      Any clue if using nuget.exe for deleting from nuget feeds has changed or is broken? I've tried nearly all of the version of nuget.exe that exist. Any help would be appreciated.

      Thanks

      Product: ProGet
      Version: 5.0.12

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        Looking at the API there is no method to delete a nuget package either. There is for nearly every other kind of package, but not for nuget packages. At least according to the servers API documentation found at

        http://my.nuget.server/api/json?API_KEY=1234

        I have thousands of nuget packages to delete. Not going to do that through the UI...

        L 1 Reply Last reply Reply Quote 1
        • ? This user is from outside of this forum
          Guest
          last edited by

          To delete NuGet packages, please refer to the NuGet API.

          Of course you can also use commandline nuget.exe, which is what you seem to have done. But in this case, you do not seem to be using the correct URL/source for ProGet.

          It should be something like, http://my.nuget.server/nuget/Feedname.

          1 Reply Last reply Reply Quote 0
          • L Offline
            luis_angel.santamarta_9206 @Guest
            last edited by

            Hi @ReginaldD, did you manage to bulk-delete packages from your server using inedo API?
            Cheers,

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation