From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: Ever-growing store with --gc-keep-outputs? Date: Fri, 09 Nov 2018 02:13:43 -0500 Message-ID: <87muqiwwn1.fsf@netris.org> References: <87y3c74zoa.fsf@ambrevar.xyz> <87a7olpxvt.fsf@gnu.org> <87lg857nfd.fsf@ambrevar.xyz> <87woroieyt.fsf@gnu.org> <87y3c45ou5.fsf@ambrevar.xyz> <87o9d0geez.fsf@netris.org> <34cb1281-438a-3a0b-44a1-afaa7d57487b@riseup.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]:43381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gL10J-0005bS-RA for help-guix@gnu.org; Fri, 09 Nov 2018 02:14:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gL10D-0000nJ-Au for help-guix@gnu.org; Fri, 09 Nov 2018 02:14:53 -0500 Received: from world.peace.net ([64.112.178.59]:58066) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gL10C-0000bl-1l for help-guix@gnu.org; Fri, 09 Nov 2018 02:14:48 -0500 In-Reply-To: <34cb1281-438a-3a0b-44a1-afaa7d57487b@riseup.net> (swedebugia's message of "Fri, 9 Nov 2018 07:53:57 +0100") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: swedebugia Cc: Guix-Help swedebugia writes: > On 2018-09-14 19:46, Mark H Weaver wrote: >> Hi Pierre, >> >> Pierre Neidhardt writes: >> >>>> If, say, =E2=80=9Ccoreutils=E2=80=9D is live, then the corresponding = =E2=80=9Ccoreutils.drv=E2=80=9D >>>> will be considered live as well when you pass --gc-keep-derivations. >>> Is the .drv live forever then? Even when all the corresponding outputs= have >>> been deleted from all profiles / generations? >> No, certainly not. To expand on what Ludovic wrote, by passing >> --gc-keep-derivations, you are providing an additional way for a .drv to >> be reachable from your GC roots. The .drv file will be kept alive for >> as long as any of its outputs are kept alive. More generally, it will >> be kept alive as long as anything that was built upon it is kept alive. >> That does not imply that .drv files are kept alive forever. >> >> I've been using --gc-keep-derivations=3Dyes and --gc-keep-outputs=3Dyes = for >> a long time, and it works well in my preferred mode of operation where I >> build everything locally and never use substitutes. It ensures that >> everything needed to build my GC-root-protected store items will be kept >> alive. > > Interesting setup. Would you be willing to share the amount of space > consumed by this mode? My /gnu/store uses approximately 30 GB. > How many packages do you use? It's mostly GNOME 3 plus Emacs and IceCat, and a few other applications that bring in qtbase, wxwidgets, etc. > Are you willing to share your config also? My config is somewhat messy, not worthy of emulation at this time, and mostly not relevant to this thread. However, for those who want to build everything locally, the relevant bit is this, which disables substitutes in the daemon: --8<---------------cut here---------------start------------->8--- (services (cons* ... (modify-services %base-services (guix-service-type config =3D> (guix-configuration (inherit config) (use-substitutes? #f) (authorized-keys '()) (substitute-urls '()) (extra-options '("--gc-keep-derivations=3Dye= s" "--gc-keep-outputs=3Dyes"))= ))))) --8<---------------cut here---------------end--------------->8--- I also deleted /etc/guix/acl on my system. >> When I want to free up some disk space, I do the following steps: >> >> (1) update my user profiles and delete old generations >> (2) delete older generations in /var/guix/profiles (but always >> keeping the one referenced by /run/booted-system!) >> (3) reconfigure the system to remove the old system profiles from >> grub.cfg >> (4) guix gc > This would be nice to have in the manual I think. Would you like to propose a patch? Mark