From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: a bit curiousity Date: Tue, 22 Dec 2015 17:54:28 +0100 Message-ID: <87mvt2bf0b.fsf@gnu.org> References: <87y4cm7bgy.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBQCr-0008OF-31 for guix-devel@gnu.org; Tue, 22 Dec 2015 11:54:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBQCl-0000xR-Rz for guix-devel@gnu.org; Tue, 22 Dec 2015 11:54:37 -0500 In-Reply-To: <87y4cm7bgy.fsf@elephly.net> (Ricardo Wurmus's message of "Tue, 22 Dec 2015 16:24:29 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: guix-devel@gnu.org, Dika Setya Prayogi Ricardo Wurmus skribis: > Dika Setya Prayogi 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=E2=80=99s not the latest generatio= n of > the profile) it won=E2=80=99t 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 =E2=80=9Cold=E2=80=9D packages ar= e referenced in > the current profile generation. This essentially requires a forced > upgrade with deletion of older profile generations, which seems quite > unwise. You=E2=80=99d throw away some of the best features of Guix, in my > opinion. One could have a periodic job that runs: guix package --delete-generations=3D1m && 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=E2=80=99m very unlike= ly to ever need to roll back to them. Ludo=E2=80=99.