Subject: Re: [bug#35176] [PATCH 0/5] 'guix gc --delete-generations' and '--list-roots'

From: Ludovic Courtès <[email-masked]>
Date: Tue, 09 Apr 2019 22:02:07 +0200

Hi Björn,

Björn Höfling <[email-masked]> skribis:

> On Sat,  6 Apr 2019 23:26:56 +0200
> Ludovic Courtès <[email-masked]> wrote:
>
>> Hello Guix!
>> 
>> This patch series is mostly about making it easier to free space:
>> ‘guix gc --delete-generations’ deletes old generations of all the
>> user’s profiles prior to collecting garbage.
>> 
>> For consistency, ‘--delete-generations’ is aliased with ‘-d’, so
>> ‘-d’ is repurposed (until now it was an alias for ‘--delete’).
>
> I'm using regularly `guix gc -d /gnu/store/...` and I'm a bit concerned
> about re/abusing this existing parameter. First I like the simple '-d'
> to delete a store path.

It still works actually, it just prints a warning stating that it’s
deprecated.  (I’m used to ‘-d’ as well but I’m confident my muscle
memory will get used to ‘-D’.  :-))

> Second, how big is the chance I could accidentally delete (all) older
> generations of my profiles?

It’s unlikely because if you do “guix gc -d /gnu/store/…”, it still
behaves like before.

Does it address your concern?

> I really like to keep them for a long time, until my disk is
> near-full, and it looks like gc-roots are no longer a safe way to keep
> them?

It’s still safe, I do the same as you!  The intent is just to provide a
simple way to “remove old stuff” (currently you have to know that you
have at least two profiles, and then run ‘guix package -p … -d’, which
isn’t very convenient when all you want is to free some space.)

Thanks for your feedback!

Ludo’.