>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 address@hidden Managing free space address@hidden Managing free space + address@hidden free up space address@hidden 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: + address@hidden @asis + address@hidden 1) address@hidden package -p ~s --delete-generations=1m} + address@hidden 2) +Manually delete old system generations symlinks in address@hidden/var/guix/profiles}, but always keeping at least the one referenced by address@hidden/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}. + address@hidden 3) +Reconfigure the system to remove the deleted system profiles from +grub.cfg, see @pxref{Invoking guix system} + address@hidden 4) +Lastly finish cleaning up with @command{guix gc}. + address@hidden 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