[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a bit curiousity
From: |
Ludovic Courtès |
Subject: |
Re: a bit curiousity |
Date: |
Tue, 22 Dec 2015 17:54:28 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
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’.