delete-package-versions icon indicating copy to clipboard operation
delete-package-versions copied to clipboard

Feature request: keep only N latest versions of the package

Open zmeyc opened this issue 5 years ago • 9 comments

It would be cool to have an option to keep only N latest versions of 'package-name' and deleting other versions.

It can be used in combination with date-based deletion https://github.com/actions/delete-package-versions/issues/4

zmeyc avatar Mar 13 '20 20:03 zmeyc

Voted for this one : it would really help if we could keep only N latest versions of a package. Thanks!

coronaction avatar Jul 02 '20 05:07 coronaction

Yes, this feature would be highly useful

didier-durand avatar Jul 11 '20 17:07 didier-durand

Came here to ask for this :)

sullrich84 avatar Oct 05 '20 08:10 sullrich84

The Action does not make sense without this. Upvote!

hazcod avatar Oct 19 '20 06:10 hazcod

similarly, i'd want say "last X versions and all versions less than 30 days old"

jonathanong-houzz avatar Nov 16 '20 20:11 jonathanong-houzz

Until this is implemented here, I wrote an action which is able to delete everything apart from a configurable number of latest packages (ordered by date desc): https://github.com/SmartsquareGmbH/delete-old-packages

rubengees avatar Nov 17 '20 10:11 rubengees

Excellent!

didier-durand avatar Nov 17 '20 12:11 didier-durand

This feature is the first thing I thought about when I found out about this action. I was actually surprised to find out it couldn't do it. Definitely upvoting, but I'm not too hopeful given this project hasn't been updated for quite some time...

chingc avatar Sep 10 '21 20:09 chingc

Yes, would like to setup package deletion rule like this:

  • Keep the N most recent versions, and
  • keep all versions created in the past Y months.

(and delete all other versions)

sandstrom avatar Jan 13 '22 21:01 sandstrom