From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: guix gc, any way to delete only packages that aren't required to build anything? Date: Fri, 30 Nov 2018 15:29:23 -0500 Message-ID: <87mupqnwap.fsf@netris.org> References: <20181129210707.3dbf5f5a@mailbox.org> <878t1b2lj1.fsf@elephly.net> <87a7lrgd30.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSpQg-0001ur-H9 for help-guix@gnu.org; Fri, 30 Nov 2018 15:30:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSpQd-0007t6-9W for help-guix@gnu.org; Fri, 30 Nov 2018 15:30:26 -0500 Received: from world.peace.net ([64.112.178.59]:41026) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gSpQd-0006we-4m for help-guix@gnu.org; Fri, 30 Nov 2018 15:30:23 -0500 In-Reply-To: <87a7lrgd30.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Fri, 30 Nov 2018 09:54:27 +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: Matthew Brooks Cc: help-guix@gnu.org Pierre Neidhardt writes: > I've been bugged by this as well (see > https://lists.gnu.org/archive/html/help-guix/2018-09/msg00028.html). There are > a few options beside Ricardo's suggestion: > > - You can start the Guix daemon with --gc-keep-outputs (see "(guix) Invoking > guix-daemon" in the manual). This will never delete anything that is still > required, but this leads to an ever-growing store. If you've got limited > storage space, you might not want this. On my GuixSD system where substitutes are completely disabled and I build everything locally, I've been running my Guix daemon with both --gc-keep-derivations=yes and --gc-keep-outputs=yes for years. Here's the relevant excerpt of my OS config: (services (cons* <... my custom services here ...> (modify-services (remove (lambda (svc) (eq? (service-kind svc) wicd-service-type)) %base-services) (guix-service-type config => (guix-configuration (inherit config) (use-substitutes? #f) (authorized-keys '()) (substitute-urls '()) (extra-options '("--gc-keep-derivations=yes" "--gc-keep-outputs=yes"))))))) This configuration allows me to run "guix gc" without losing the dependencies that are needed to build the packages that are currently protected by GC roots, e.g. the packages in my profiles and system generations. It's not perfect: I lose a few packages apparently related to grafts, but it's not too much in practice, and I can manually add more GC roots to handle those cases. Contrary to what Pierre wrote above, I've found that the use of these flags certainly does _not_ lead to an ever-growing store. On my GNOME 3 GuixSD system, my store requires ~30 gigabytes, and as long as I trim my older profiles and system generations regularly, the space requirements are fairly stable over time. Regards, Mark