rustic icon indicating copy to clipboard operation
rustic copied to clipboard

Update help text of prune --keep-delete

Open nickchomey opened this issue 3 years ago • 2 comments

I ran prune --keep-delete 10m and confirmed that the files had been marked for deletion with repoinfo. However, I came back 10m+ later and they were still there. I then ran prune again and they were still not removed.

Am I making a mistake somewhere?

nickchomey avatar Aug 07 '22 19:08 nickchomey

Thanks for your question! The --keep-delete option is evaluated by the prune run which deletes marked files. In your case, it must be specified in the second, and not (necessarily) in the first run.

I would actually advise to always run prune with the same options as one run can at the same time mark unused packs for removal and remove previously marked packs if they are still not used and the mark is old enough.

aawsome avatar Aug 07 '22 19:08 aawsome

I understand, thanks for the clarification. It just pruned successfully by adding --keep-delete 10m to the subsequent prune command.

Can I suggest changing the documentation from minimum duration (e.g. 10m) to keep packs marked for deletion [default: 23h] (this suggests, to me, a sort of forward-looking attribute that is assigned to the currently pruned files) to delete packs that were marked for deletion prior to the currently specified duration (e.g. 10m) [default 23h] (which makes it more explicit that it uses the currently-specified duration in a backward-looking manner

Also, perhaps add a note about the permissible time codes - m, h, d, w, mo, y?

nickchomey avatar Aug 07 '22 19:08 nickchomey