From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: guix gc, any way to delete only packages that aren't required to build anything? Date: Fri, 30 Nov 2018 06:15:46 +0100 Message-ID: <878t1b2lj1.fsf@elephly.net> References: <20181129210707.3dbf5f5a@mailbox.org> 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]:56913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSbA7-0003WO-4d for help-guix@gnu.org; Fri, 30 Nov 2018 00:16:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSbA2-0002o4-7B for help-guix@gnu.org; Fri, 30 Nov 2018 00:16:23 -0500 Received: from sender-of-o52.zoho.com ([135.84.80.217]:21383) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gSbA1-0002nZ-S4 for help-guix@gnu.org; Fri, 30 Nov 2018 00:16:18 -0500 In-reply-to: <20181129210707.3dbf5f5a@mailbox.org> 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" Hi Matthew, > Is there any recommended way to have guix gc only delete packages that > aren't required to build anything? This requirement is a little vague. Do you mean to only delete leaf packages? Or do you just want to keep a version of GCC? You could create an environment containing all dependencies for a package of interest and register it as a GC root, so it won=E2=80=99t be collected. For example: guix environment --root=3D$HOME/.dev-env guile Then you can run =E2=80=9Cguix gc=E2=80=9D with reckless abandon and be sur= e that at least the dependencies of the =E2=80=9Cguile=E2=80=9D package (at that part= icular version of Guix) will not be collected. There is also a daemon option, which might be of interest to you, though it may keep more (or less) than what you want: --gc-keep-derivations[=3Dyes/no] tell whether the GC must keep derivations corresponding to live outputs Hope this helps! -- Ricardo