[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a bit curiousity
From: |
Dika Setya Prayogi |
Subject: |
Re: a bit curiousity |
Date: |
Wed, 23 Dec 2015 14:56:46 +0700 |
many thanks for the info :-)
2015-12-22 23:54 GMT+07.00, Ludovic Courtès <address@hidden>:
> Ricardo Wurmus <address@hidden> skribis:
>
>> Dika Setya Prayogi <address@hidden> writes:
>
> [...]
>
>>> 2.set auto garbage collect for package old than one month
>>
>> Garbage collection is not about age but about references. If a package
>> is referenced in a profile (even if it’s not the latest generation of
>> the profile) it won’t be collected. This is a feature.
>>
>> To achieve garbage collection of old packages you would have to remove
>> all old profile generations (so that older packages are no longer
>> referenced), and also make sure that no “old” packages are referenced in
>> the current profile generation. This essentially requires a forced
>> upgrade with deletion of older profile generations, which seems quite
>> unwise. You’d throw away some of the best features of Guix, in my
>> opinion.
>
> One could have a periodic job that runs:
>
> guix package --delete-generations=1m && guix gc
>
> This removes generations older than 1 month and then runs the GC.
>
> Depending on your use case, this may or may not be a good idea. I
> personally prefer to remove generations once I know I’m very unlikely to
> ever need to roll back to them.
>
> Ludo’.
>