BaGet icon indicating copy to clipboard operation
BaGet copied to clipboard

UI: Deletion of packages

Open LordMike opened this issue 5 years ago • 17 comments

Do you want to request a feature or report a bug?

Feature

What did you expect to see?

  • A delete button next to a package (all versions)
  • A delete button next to a package version
  • A delete button for many packages, perhaps all at once

In other words, are there any high level plans for the web ui?

LordMike avatar Nov 29 '18 23:11 LordMike

In other words, are there any high level plans for the web ui?

Yup! I intend to recreate most of NuGet.org's UI, only with yellow highlights 😄

loic-sharma avatar Dec 01 '18 04:12 loic-sharma

yes, that is sound very good. also, if we can set a pakcage 'max version count' value, automatic delete the oldest versions... is it OK ?

timiil avatar Dec 27 '18 13:12 timiil

@timiil see #142 for package retention

LordMike avatar Dec 27 '18 16:12 LordMike

How can we manually delete packages at this point? I attempted to delete with

nuget delete MyPackage 1.0 -Source https://nuget.mydomain.com -ApiKey API-KEY

I get the warning and a prompt, and then I get this:

DELETE https://nuget.mydomain.com/api/v2/package/MyPackage/1.0
NoContent https://nuget.domain.com/api/v2/package/MyPackage/1.0 498ms
MyPackage 1.0 was deleted successfully.

But I can still see the package in the UI and the files still exist on the storage location. I would assume I can physically delete the file from the storage location, but what happens to the database entry? Isn't it index?

The whole issue with this is that I am trying to replace a package with an updated one of the same version. But I keep getting 409 - Conflict errors, because there is an existing package.

UPDATE: So I just deleted the package from the file system, and as expected, the entry still shows up on the UI, this means the db entry needs to be deleted as well.

bkraul avatar Jan 25 '19 21:01 bkraul

Deletion should be implemented, at least the code is there. The default is however, for deletions to unlist packages - not delete them.

You need to configure BaGetOptions, which if I read this correctly is the root of the appsettings.json.

Just adding "PackageDeletionBehavior": "HardDelete" in the appsettings.json, next to ApiKey should do it for you.

LordMike avatar Jan 26 '19 11:01 LordMike

I enabled the HardDelete option, and was able to delete the package properly.

However, what about package replacement? Should not there be an option to replace packages with matching version number? Right now, even with HardDelete set, I still get 409 when replacing the package. I read about the whole left-pad thing, and I understand it, but our organization's needs are different. It would help if the UI allowed for proper package management, but I understand it is in early stages, and it is looking GREAT!

We are currently using phpNuget, which supports deletion and replacement, but we are seeing very slow activity in the development and are looking for other options.

Thanks for your help, @LordMike .

bkraul avatar Jan 26 '19 12:01 bkraul

This seems like a seperate issue - I can't find anything, but I think I once saw something along the lines of allowing replacement of packages. Because yes, BaGet is to be run in a local setting, and cater to approximately one use case.. (those that run it), so it should allow all kinds of weirdness.

I'd create an issue on it, @bkraul

LordMike avatar Jan 26 '19 16:01 LordMike

Thanks for the help @LordMike!

loic-sharma avatar Jan 29 '19 13:01 loic-sharma

I also needed to "clean" up my packages and searched for a way to delete some old test packages from Baget. Unfortunately theres no information on the help page (like its done with PUSH) of my Baget installation, so Im glad I found this topic! :)

I used this command to delete a package from Baget:

dotnet nuget delete mynuget 1.0.0 -s http://localhost:5000/v3/index.json -k "myapikey" --non-interactive

Is it possible to add another help page in Baget Server for this? I think this one might be an option which is used by many people.

Cocotus avatar Jun 10 '19 10:06 Cocotus

I'd like to throw my hat in the ring as this being a really useful addition. I've been doing command-line jujitsu to remove packages, but for packages with multiple revisions this is a big PITA. Also, the removal removes the package but not its parent folder, which means I have to go behind and clean up the folder structure as well.

Loving the app btw - this is basically the only missing feature for me.

Best,

--J

jsreynolds avatar Aug 01 '19 20:08 jsreynolds

However, what about package replacement? Should not there be an option to replace packages with matching version number? Right now, even with HardDelete set, I still get 409 when replacing the package. I read about the whole left-pad thing, and I understand it, but our organization's needs are different. It would help if the UI allowed for proper package management, but I understand it is in early stages, and it is looking GREAT!

You may use "AllowPackageOverwrites": true, in the same appsettings.json, but this feature is extremely toxic. Consider applying proper versioning in your CI / CD process.

Darth-Jurassic avatar Aug 15 '19 08:08 Darth-Jurassic

Any updates on this? We'd love to have a button to delete the package :)!

Baklap4 avatar May 08 '20 09:05 Baklap4

Any update?

Suriman avatar Nov 04 '20 16:11 Suriman

is this project still supported?

a-a-k avatar Jan 11 '21 03:01 a-a-k

// Push

I would love to have this feature

OnSive avatar Jun 21 '22 15:06 OnSive

Any update?

nguyenloki258 avatar Dec 07 '22 05:12 nguyenloki258

push

qwertz44 avatar Dec 19 '23 09:12 qwertz44