From patchwork Wed Nov 14 08:21:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: swedebugia X-Patchwork-Id: 196 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E89B0167CE; Wed, 14 Nov 2018 08:22:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) by mira.cbaines.net (Postfix) with ESMTPS id 41277167A5 for ; Wed, 14 Nov 2018 08:22:10 +0000 (GMT) Received: from localhost ([::1]:58843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMqR7-0006k0-3G for patchwork@mira.cbaines.net; Wed, 14 Nov 2018 03:22:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMqR4-0006jd-1l for guix-patches@gnu.org; Wed, 14 Nov 2018 03:22:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMqR0-0002QA-Rn for guix-patches@gnu.org; Wed, 14 Nov 2018 03:22:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:46648) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gMqR0-0002Q6-Nl for guix-patches@gnu.org; Wed, 14 Nov 2018 03:22:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gMqR0-0000jw-Iq for guix-patches@gnu.org; Wed, 14 Nov 2018 03:22:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#33374] [PATCH] doc: guix: Inform about deleting old system generations Resent-From: swedebugia Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Nov 2018 08:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33374 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33374@debbugs.gnu.org, mail@ambrevar.xyz, mhw@netris.org X-Debbugs-Original-To: guix-patches@gnu.org, Pierre Neidhardt , Mark H Weaver Received: via spool by submit@debbugs.gnu.org id=B.15421837032815 (code B ref -1); Wed, 14 Nov 2018 08:22:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Nov 2018 08:21:43 +0000 Received: from localhost ([127.0.0.1]:50906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMqQh-0000jL-4B for submit@debbugs.gnu.org; Wed, 14 Nov 2018 03:21:43 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMqQf-0000j9-Tn for submit@debbugs.gnu.org; Wed, 14 Nov 2018 03:21:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMqQZ-0002C7-IQ for submit@debbugs.gnu.org; Wed, 14 Nov 2018 03:21:36 -0500 Received: from lists.gnu.org ([2001:4830:134:3::11]:59166) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gMqQZ-0002C1-Ev for submit@debbugs.gnu.org; Wed, 14 Nov 2018 03:21:35 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMqQY-0006h7-4Z for guix-patches@gnu.org; Wed, 14 Nov 2018 03:21:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMqQU-0002AE-UH for guix-patches@gnu.org; Wed, 14 Nov 2018 03:21:34 -0500 Received: from mx1.riseup.net ([198.252.153.129]:45269) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gMqQU-00029j-Hn for guix-patches@gnu.org; Wed, 14 Nov 2018 03:21:30 -0500 Received: from piha.riseup.net (piha-pn.riseup.net [10.0.1.163]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id CC73D1A015E; Wed, 14 Nov 2018 00:21:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1542183689; bh=TQaaXuC5WpL9DgO988yu3uDkUy0fyI8JNBWerkKl+KA=; h=Subject:References:To:From:Date:In-Reply-To:From; b=gflKyYsCgcpFhJPcuKdg3DjPd7AXON++6hob8mkV1xaRYWfpVOItwxm0vf85ajDXF +dnPlEPkvDuFo+s2SS43fRGOkGdvsrCMYQJ846UXZiVXO4kwLAGcYAr0m6J6n+HCGb gqmCr5QMeG2Q41rFiqR4i/zuCJBe+X2d6CIcriGM= X-Riseup-User-ID: 90C71FA1251F33CB25E86D5C4148C8D4BB1D146626B47C8297E40474EF311CA9 Received: from [127.0.0.1] (localhost [127.0.0.1]) by piha.riseup.net with ESMTPSA id A002B66824; Wed, 14 Nov 2018 00:21:26 -0800 (PST) References: <87muqiwwn1.fsf@netris.org> From: swedebugia X-Forwarded-Message-Id: <87muqiwwn1.fsf@netris.org> Message-ID: <351b7d95-8226-bbcb-eeaa-16ff2249783f@riseup.net> Date: Wed, 14 Nov 2018 09:21:24 +0100 MIME-Version: 1.0 In-Reply-To: <87muqiwwn1.fsf@netris.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Note the FIXME. -------- Forwarded Message -------- Subject: Re: Ever-growing store with --gc-keep-outputs? Date: Fri, 09 Nov 2018 02:13:43 -0500 From: Mark H Weaver To: swedebugia CC: Pierre Neidhardt , Guix-Help >> Pierre Neidhardt writes: snip >> 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 From 8825b2aa2a10c0fa536486cd52a488601a7846d3 Mon Sep 17 00:00:00 2001 From: swedebugia Date: Wed, 14 Nov 2018 09:13:25 +0100 Subject: [PATCH] doc: guix: Inform users about deleting old system generations to save space * guix/scripts.scm: Expand error message. FIXME: we should hide this from non-GuixSD-users. * doc/guix.texi (GNU System Distribution): New section: Managing free space. --- doc/guix.texi | 37 +++++++++++++++++++++++++++++++++++++ guix/scripts.scm | 9 +++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 0ba034e82..dd507cbc4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -212,6 +212,7 @@ GNU Distribution * Documentation:: Browsing software user manuals. * Installing Debugging Files:: Feeding the debugger. * Security Updates:: Deploying security fixes quickly. +* Managing free space:: Delete unused files from the store. * Package Modules:: Packages from the programmer's viewpoint. * Packaging Guidelines:: Growing the distribution. * Bootstrapping:: GNU/Linux built from scratch. @@ -8894,6 +8895,7 @@ For information on porting to other architectures or kernels, * Documentation:: Browsing software user manuals. * Installing Debugging Files:: Feeding the debugger. * Security Updates:: Deploying security fixes quickly. +* Managing free space:: Delete unused files from the store. * Package Modules:: Packages from the programmer's viewpoint. * Packaging Guidelines:: Growing the distribution. * Bootstrapping:: GNU/Linux built from scratch. @@ -23511,6 +23513,41 @@ Lastly, to check which Bash running processes are using, you can use the lsof | grep /gnu/store/.*bash @end example +@node Managing free space +@section Managing free space + +@cindex free up space +@cindex delete system generations + +Garbage collection in GuixSD is done the same way as in Guix for package +profiles. System generations cannot yet be deleted with the @command{guix system} +command. We recommend you to follow this procedure when freeing up space in +GuixSD: + +@table @asis + +@item 1) +@command{guix package -p ~s --delete-generations=1m} + +@item 2) +Manually delete old system generations symlinks in +@file{/var/guix/profiles}, but always keeping at least the one referenced by +@file{/run/booted-system}! We recommend keeping at least the current and the +former generation to make roll-back possible, see @pxref{Invoking guix system}. + +If you would like to help implementing a guix command for +this step, see @pxref{Contributing}. + +@item 3) +Reconfigure the system to remove the deleted system profiles from +grub.cfg, see @pxref{Invoking guix system} + +@item 4) +Lastly finish cleaning up with @command{guix gc}. + +@end table + + @node Package Modules @section Package Modules diff --git a/guix/scripts.scm b/guix/scripts.scm index 5e20ecd92..702855a33 100644 --- a/guix/scripts.scm +++ b/guix/scripts.scm @@ -215,8 +215,13 @@ available." generations and collecting garbage, along these lines: @example -guix package -p ~s --delete-generations=1m -guix gc +1) $ guix package -p ~s --delete-generations=1m +2) also consider manually deleting old system generations symlinks 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) lastly clean up with: +$ guix gc @end example\n") profile)) (display-hint (G_ "Consider running @command{guix gc} to free -- 2.18.0