bagetter / BaGetter

A lightweight NuGet and symbol server
https://www.bagetter.com
MIT License
272 stars 57 forks source link

Bagetter Delete Package #150

Open leolaw7799 opened 5 months ago

leolaw7799 commented 5 months ago

Hi,

Can you please help me with the command for deleting a nupkg package from Bagetter through Command line.

I tried the below command and it throws: The remote server returned an error: (404) Not Found..

"C:\Nuget.exe" delete package_name 1.1.1 -s http://localhost/BagetterSource/v3/index.json

Also, i tried adding ApiKey in the command and it results the same error.

Kindly help me with the command to delete the package. Thanks

Regenhardt commented 5 months ago

As a test, I pushed coverlet.collector.6.0.2.nupkg to my BaGetter.

Then I deleted it using the following command:

nuget delete coverlet.collector 6.0.2 -Source https://localhost/v3/index.json

You are using -s to set the source, which only works for the dotnet nuget cli. When using nuget.exe, you need -Source or -src.
To use -s, you need to call dotnet nuget delete....