all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Ever-growing store with --gc-keep-outputs?
@ 2018-09-11 19:11 Pierre Neidhardt
  2018-09-12 10:55 ` Pierre Neidhardt
  2018-09-13  9:09 ` Ludovic Courtès
  0 siblings, 2 replies; 20+ messages in thread
From: Pierre Neidhardt @ 2018-09-11 19:11 UTC (permalink / raw)
  To: Guix-Help

[-- Attachment #1: Type: text/plain, Size: 2755 bytes --]

Hi there,

I've enabled '--gc-keep-outputs=yes' a while back (together with the
default '--gc-keep-derivations=yes'), and I've noticed that my store
keeps consuming more and more disk space after each upgrade.

From the manual "(guix) Invoking guix-daemon)":

>     When both are set to “yes”, the effect is
>     to keep all the build prerequisites (the sources, compiler,
>     libraries, and other build-time tools) of live objects in the
>     store, regardless of whether these prerequisites are reachable from
>     a GC root.  This is convenient for developers since it saves
>     rebuilds or downloads.

Does this mean that once a package has been marked as "live", it won't
ever be deleted?

For instance, I have 2 ghc-pandoc packages, both of them "live":

--8<---------------cut here---------------start------------->8---
/gnu/store/lvydshzl7pkdmvv2sfjgfvvc70vsyich-ghc-pandoc-2.2.1 

Size              : 191.5M (200775752 bytes) 
Registration time : 2018-09-03 09:56:33
Derivers          : 1  
References        : 193  
Referrers         : 14  
Requisites        : 264  
--8<---------------cut here---------------end--------------->8---

and 

--8<---------------cut here---------------start------------->8---
/gnu/store/1cks86vflnc60xjvdad3fp03hbfy9688-ghc-pandoc-2.2.1  

Size              : 191.5M (200775752 bytes)  
Registration time : 2018-09-03 09:55:40
Derivers          : 1  
References        : 193  
Referrers         : 1  
Requisites        : 264  
--8<---------------cut here---------------end--------------->8---

The last one has only one referrer: itself.  The deriver is

--8<---------------cut here---------------start------------->8---
/gnu/store/qs5c2ibj15ym6lxf72vz7ds0h96k1vv5-ghc-pandoc-2.2.1.drv 

Size              : 6.3k (6464 bytes)  
Registration time : 2018-09-03 09:49:28
Derivers          : 0
References        : 74  
Referrers         : 1  
Requisites        : 1168  
--8<---------------cut here---------------end--------------->8---

Notice it has a referrer, which is

--8<---------------cut here---------------start------------->8---
/gnu/store/5gp70m5jwyi4ryl8i7pcj3c52g3pl4hb-ghc-pandoc-2.2.1.drv  

Size              : 26.3k (26936 bytes)  
Registration time : 2018-09-03 09:49:56
Derivers          : 0
References        : 317  
Referrers         : 0
Requisites        : 1604  
--8<---------------cut here---------------end--------------->8---

that is, the deriver of the first ghc-pandoc package!  As I understand
it, there is a dependency cycle between the derivers and the packages.
Is this to be expected?

Is there a way to find which GC root causes the item to be live?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Ever-growing store with --gc-keep-outputs?
  2018-09-11 19:11 Ever-growing store with --gc-keep-outputs? Pierre Neidhardt
@ 2018-09-12 10:55 ` Pierre Neidhardt
  2018-09-13  9:09 ` Ludovic Courtès
  1 sibling, 0 replies; 20+ messages in thread
From: Pierre Neidhardt @ 2018-09-12 10:55 UTC (permalink / raw)
  To: Guix-Help

[-- Attachment #1: Type: text/plain, Size: 176 bytes --]

If I set '--gc-keep-outputs=no', then the GC cleans all packages properly.
Old, root-less versions of ghc-pandoc are collected.
-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Ever-growing store with --gc-keep-outputs?
  2018-09-11 19:11 Ever-growing store with --gc-keep-outputs? Pierre Neidhardt
  2018-09-12 10:55 ` Pierre Neidhardt
@ 2018-09-13  9:09 ` Ludovic Courtès
  2018-09-13  9:32   ` Pierre Neidhardt
  1 sibling, 1 reply; 20+ messages in thread
From: Ludovic Courtès @ 2018-09-13  9:09 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: Guix-Help

Hello,

Pierre Neidhardt <mail@ambrevar.xyz> skribis:

> Is there a way to find which GC root causes the item to be live?

Not yet!  You could do it manually roughly by (1) listing the referrers
of the store item, recursively, and (2) finding the symlinks in
/var/guix/gcroots that point to one of these.

We should add this to ‘guix gc’.

Ludo’.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Ever-growing store with --gc-keep-outputs?
  2018-09-13  9:09 ` Ludovic Courtès
@ 2018-09-13  9:32   ` Pierre Neidhardt
  2018-09-14  9:51     ` Ludovic Courtès
  0 siblings, 1 reply; 20+ messages in thread
From: Pierre Neidhardt @ 2018-09-13  9:32 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-Help

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]


> Not yet!  You could do it manually roughly by (1) listing the referrers
> of the store item, recursively, and (2) finding the symlinks in
> /var/guix/gcroots that point to one of these.

In the example in my first message, the referrers of the .drv are either
non-existent or the .drv itself.  In this case, there should be no GC root then,
right?  Why is the item considered alive?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Ever-growing store with --gc-keep-outputs?
  2018-09-13  9:32   ` Pierre Neidhardt
@ 2018-09-14  9:51     ` Ludovic Courtès
  2018-09-14 10:57       ` Pierre Neidhardt
  0 siblings, 1 reply; 20+ messages in thread
From: Ludovic Courtès @ 2018-09-14  9:51 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: Guix-Help

Pierre Neidhardt <mail@ambrevar.xyz> skribis:

>> Not yet!  You could do it manually roughly by (1) listing the referrers
>> of the store item, recursively, and (2) finding the symlinks in
>> /var/guix/gcroots that point to one of these.
>
> In the example in my first message, the referrers of the .drv are either
> non-existent or the .drv itself.  In this case, there should be no GC root then,
> right?  Why is the item considered alive?

It’s considered live because you’re using
--gc-keep-outputs/--gc-keep-derivations, which modify the way the GC
determines whether an object is live.

If, say, “coreutils” is live, then the corresponding “coreutils.drv”
will be considered live as well when you pass --gc-keep-derivations.

Ludo’.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Ever-growing store with --gc-keep-outputs?
  2018-09-14  9:51     ` Ludovic Courtès
@ 2018-09-14 10:57       ` Pierre Neidhardt
  2018-09-14 17:46         ` Mark H Weaver
  0 siblings, 1 reply; 20+ messages in thread
From: Pierre Neidhardt @ 2018-09-14 10:57 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-Help

[-- Attachment #1: Type: text/plain, Size: 408 bytes --]


> If, say, “coreutils” is live, then the corresponding “coreutils.drv”
> 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?

What's the point of keeping a .drv that cannot be traced back to a GC root?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Ever-growing store with --gc-keep-outputs?
  2018-09-14 10:57       ` Pierre Neidhardt
@ 2018-09-14 17:46         ` Mark H Weaver
  2018-09-14 18:02           ` Pierre Neidhardt
  2018-11-09  6:53           ` swedebugia
  0 siblings, 2 replies; 20+ messages in thread
From: Mark H Weaver @ 2018-09-14 17:46 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: Guix-Help

Hi Pierre,

Pierre Neidhardt <mail@ambrevar.xyz> writes:

>> If, say, “coreutils” is live, then the corresponding “coreutils.drv”
>> 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=yes and --gc-keep-outputs=yes 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.

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

Does that work for you?

       Mark

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Ever-growing store with --gc-keep-outputs?
  2018-09-14 17:46         ` Mark H Weaver
@ 2018-09-14 18:02           ` Pierre Neidhardt
  2018-09-14 21:34             ` Mark H Weaver
  2018-11-09  6:53           ` swedebugia
  1 sibling, 1 reply; 20+ messages in thread
From: Pierre Neidhardt @ 2018-09-14 18:02 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: Guix-Help

[-- Attachment #1: Type: text/plain, Size: 706 bytes --]

> it works well in my preferred mode of operation where I
> build everything locally and never use substitutes.

Do substitutes change the way GC behaves?  I use substitutes.

> (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!)

You mean system generations?  I did that.

> (3) reconfigure the system to remove the old system profiles from
>     grub.cfg
> (4) guix gc

I did all this.  Then ghc-pandoc and all the ghc dependencies did not go.

Hmm...  I must be missing something.  Or else could there be a bug?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Ever-growing store with --gc-keep-outputs?
  2018-09-14 18:02           ` Pierre Neidhardt
@ 2018-09-14 21:34             ` Mark H Weaver
  2018-09-14 22:10               ` Pierre Neidhardt
  0 siblings, 1 reply; 20+ messages in thread
From: Mark H Weaver @ 2018-09-14 21:34 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: Guix-Help

Pierre Neidhardt <mail@ambrevar.xyz> writes:

>> it works well in my preferred mode of operation where I
>> build everything locally and never use substitutes.
>
> Do substitutes change the way GC behaves?  I use substitutes.

No.  However, if you build everything locally, it becomes more important
to avoid deleting store items that will be needed to build your next
system update, and so the --gc-keep-* flags become important.

>> (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!)
>
> You mean system generations?  I did that.

Right.

>> (3) reconfigure the system to remove the old system profiles from
>>     grub.cfg
>> (4) guix gc
>
> I did all this.  Then ghc-pandoc and all the ghc dependencies did not go.

What is the output of "guix gc --referrers /gnu/store/xxxxx.drv" when
applied to the .drv file for ghc-pandoc?

      Mark

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Ever-growing store with --gc-keep-outputs?
  2018-09-14 21:34             ` Mark H Weaver
@ 2018-09-14 22:10               ` Pierre Neidhardt
  0 siblings, 0 replies; 20+ messages in thread
From: Pierre Neidhardt @ 2018-09-14 22:10 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: Guix-Help

[-- Attachment #1: Type: text/plain, Size: 432 bytes --]

> What is the output of "guix gc --referrers /gnu/store/xxxxx.drv" when
> applied to the .drv file for ghc-pandoc?

I've now removed ghc-pandoc by turning off --gc-keep-..., but from my first post,

- /gnu/store/qs5c2ibj15ym6lxf72vz7ds0h96k1vv5-ghc-pandoc-2.2.1.drv has 1
referrer, itself;

- /gnu/store/5gp70m5jwyi4ryl8i7pcj3c52g3pl4hb-ghc-pandoc-2.2.1.drv  has 0 referrer.

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Ever-growing store with --gc-keep-outputs?
  2018-09-14 17:46         ` Mark H Weaver
  2018-09-14 18:02           ` Pierre Neidhardt
@ 2018-11-09  6:53           ` swedebugia
  2018-11-09  7:13             ` Mark H Weaver
  1 sibling, 1 reply; 20+ messages in thread
From: swedebugia @ 2018-11-09  6:53 UTC (permalink / raw)
  To: Mark H Weaver, Pierre Neidhardt; +Cc: Guix-Help

Hi

On 2018-09-14 19:46, Mark H Weaver wrote:
> Hi Pierre,
>
> Pierre Neidhardt <mail@ambrevar.xyz> writes:
>
>>> If, say, “coreutils” is live, then the corresponding “coreutils.drv”
>>> 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=yes and --gc-keep-outputs=yes 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?
How many packages do you use?
Are you willing to share your config also?

> 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.

-- 
Cheers Swedebugia

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Ever-growing store with --gc-keep-outputs?
  2018-11-09  6:53           ` swedebugia
@ 2018-11-09  7:13             ` Mark H Weaver
  2018-11-09 10:58               ` Pierre Neidhardt
  2018-11-14  8:21               ` [bug#33374] [PATCH] doc: guix: Inform about deleting old system generations swedebugia
  0 siblings, 2 replies; 20+ messages in thread
From: Mark H Weaver @ 2018-11-09  7:13 UTC (permalink / raw)
  To: swedebugia; +Cc: Guix-Help

swedebugia <swedebugia@riseup.net> writes:

> On 2018-09-14 19:46, Mark H Weaver wrote:
>> Hi Pierre,
>>
>> Pierre Neidhardt <mail@ambrevar.xyz> writes:
>>
>>>> If, say, “coreutils” is live, then the corresponding “coreutils.drv”
>>>> 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=yes and --gc-keep-outputs=yes 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 =>
                             (guix-configuration
                               (inherit config)
                               (use-substitutes? #f)
                               (authorized-keys '())
                               (substitute-urls '())
                               (extra-options '("--gc-keep-derivations=yes"
                                                "--gc-keep-outputs=yes")))))))
--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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Ever-growing store with --gc-keep-outputs?
  2018-11-09  7:13             ` Mark H Weaver
@ 2018-11-09 10:58               ` Pierre Neidhardt
  2018-11-09 16:47                 ` swedebugia
  2018-11-14  8:21               ` [bug#33374] [PATCH] doc: guix: Inform about deleting old system generations swedebugia
  1 sibling, 1 reply; 20+ messages in thread
From: Pierre Neidhardt @ 2018-11-09 10:58 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: Guix-Help

[-- Attachment #1: Type: text/plain, Size: 817 bytes --]


> : > 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?

Note that for a while Guix now suggest (1) and (4) when the store is low on
space.

I like interactive help, I think it reaches a wider audience than just the
manual.
Having both is also great, at the expense of risking inconsistencies if one is
updated but not the other.

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Ever-growing store with --gc-keep-outputs?
  2018-11-09 10:58               ` Pierre Neidhardt
@ 2018-11-09 16:47                 ` swedebugia
  2018-11-13 20:31                   ` Leo Famulari
  0 siblings, 1 reply; 20+ messages in thread
From: swedebugia @ 2018-11-09 16:47 UTC (permalink / raw)
  To: Pierre Neidhardt, Mark H Weaver; +Cc: Guix-Help

Hi

On 2018-11-09 11:58, Pierre Neidhardt wrote:
>> : > 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?
> Note that for a while Guix now suggest (1) and (4) when the store is low on
> space.
>
> I like interactive help, I think it reaches a wider audience than just the
> manual.
> Having both is also great, at the expense of risking inconsistencies if one is
> updated but not the other.
Thanks for the heads up! I totally agree. Guix is way too silent to my 
taste, comparing with e.g. pacman and git.

Generally I see the documentation in a manual as something complementing 
the program - not an excuse to keep the error messages very terse and 
refrain from gently nudging the user in the right direction.

-- 
Cheers
Swedebugia

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Ever-growing store with --gc-keep-outputs?
  2018-11-09 16:47                 ` swedebugia
@ 2018-11-13 20:31                   ` Leo Famulari
  2018-11-13 21:14                     ` swedebugia
  0 siblings, 1 reply; 20+ messages in thread
From: Leo Famulari @ 2018-11-13 20:31 UTC (permalink / raw)
  To: swedebugia; +Cc: Mark H Weaver, Guix-Help

[-- Attachment #1: Type: text/plain, Size: 532 bytes --]

On Fri, Nov 09, 2018 at 05:47:47PM +0100, swedebugia wrote:
> Thanks for the heads up! I totally agree. Guix is way too silent to my
> taste, comparing with e.g. pacman and git.

Now we are ready to discuss the color of the bike shed ... ;)

But I think the best way is to make the software "just work", so that it
can be silent and not make the user wish for more verbose comments. This
is definitely possible — a lot of software is like this. It's so
reliable that we forget there are computer programs running there.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Ever-growing store with --gc-keep-outputs?
  2018-11-13 20:31                   ` Leo Famulari
@ 2018-11-13 21:14                     ` swedebugia
  0 siblings, 0 replies; 20+ messages in thread
From: swedebugia @ 2018-11-13 21:14 UTC (permalink / raw)
  To: Leo Famulari; +Cc: Mark H Weaver, Guix-Help

On 2018-11-13 21:31, Leo Famulari wrote:

snip

> But I think the best way is to make the software "just work", so that it
> can be silent and not make the user wish for more verbose comments. This
> is definitely possible — a lot of software is like this. It's so
> reliable that we forget there are computer programs running there.
> 

Yeah! Lets do that :)

If we ever have a nice guix gui like pamac then all this CLI stuff will 
probably be abstracted away.
It already is in emacs-guix, which I like a lot!

-- 
Cheers
Swedebugia

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#33374] [PATCH] doc: guix: Inform about deleting old system generations
  2018-11-09  7:13             ` Mark H Weaver
  2018-11-09 10:58               ` Pierre Neidhardt
@ 2018-11-14  8:21               ` swedebugia
  2019-01-03 16:24                 ` swedebugia
  2022-04-07 11:56                 ` zimoun
  1 sibling, 2 replies; 20+ messages in thread
From: swedebugia @ 2018-11-14  8:21 UTC (permalink / raw)
  To: 33374, mail, mhw

[-- Attachment #1: Type: text/plain, Size: 808 bytes --]

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 <mhw@netris.org>
To: swedebugia <swedebugia@riseup.net>
CC: Pierre Neidhardt <mail@ambrevar.xyz>, Guix-Help <help-guix@gnu.org>

>> Pierre Neidhardt <mail@ambrevar.xyz> 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

[-- Attachment #2: 0001-doc-guix-Inform-users-about-deleting-old-system-gene.patch --]
[-- Type: text/x-patch, Size: 3699 bytes --]

From 8825b2aa2a10c0fa536486cd52a488601a7846d3 Mon Sep 17 00:00:00 2001
From: swedebugia <swedebugia@riseup.net>
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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#33374] [PATCH] doc: guix: Inform about deleting old system generations
  2018-11-14  8:21               ` [bug#33374] [PATCH] doc: guix: Inform about deleting old system generations swedebugia
@ 2019-01-03 16:24                 ` swedebugia
  2022-04-07 11:56                 ` zimoun
  1 sibling, 0 replies; 20+ messages in thread
From: swedebugia @ 2019-01-03 16:24 UTC (permalink / raw)
  To: 33374, mail, mhw

On 2018-11-14 09:21, swedebugia wrote:
> 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 <mhw@netris.org>
> To: swedebugia <swedebugia@riseup.net>
> CC: Pierre Neidhardt <mail@ambrevar.xyz>, Guix-Help <help-guix@gnu.org>
> 
>>> Pierre Neidhardt <mail@ambrevar.xyz> 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

Ping

-- 
Cheers Swedebugia

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#33374] [PATCH] doc: guix: Inform about deleting old system generations
  2018-11-14  8:21               ` [bug#33374] [PATCH] doc: guix: Inform about deleting old system generations swedebugia
  2019-01-03 16:24                 ` swedebugia
@ 2022-04-07 11:56                 ` zimoun
  2022-05-19 21:28                   ` zimoun
  1 sibling, 1 reply; 20+ messages in thread
From: zimoun @ 2022-04-07 11:56 UTC (permalink / raw)
  To: swedebugia; +Cc: mhw, 33374, mail

Hi,

Look at old patches, I hit this patch#33374:

    <http://issues.guix.gnu.org/issue/33374>


On Wed, 14 Nov 2018 at 09:21, swedebugia <swedebugia@riseup.net> wrote:

> -------- Forwarded Message --------
> Subject: Re: Ever-growing store with --gc-keep-outputs?
> Date: Fri, 09 Nov 2018 02:13:43 -0500
> From: Mark H Weaver <mhw@netris.org>
> To: swedebugia <swedebugia@riseup.net>
> CC: Pierre Neidhardt <mail@ambrevar.xyz>, Guix-Help <help-guix@gnu.org>
>
>>> Pierre Neidhardt <mail@ambrevar.xyz> 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 my point of the view, this submission should be for the Cookbook.
WDYT?


Cheers,
simon




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#33374] [PATCH] doc: guix: Inform about deleting old system generations
  2022-04-07 11:56                 ` zimoun
@ 2022-05-19 21:28                   ` zimoun
  0 siblings, 0 replies; 20+ messages in thread
From: zimoun @ 2022-05-19 21:28 UTC (permalink / raw)
  To: swedebugia; +Cc: mhw, 33374, mail

Hi,

On Thu, 07 Apr 2022 at 13:56, zimoun <zimon.toutoune@gmail.com> wrote:

> Look at old patches, I hit this patch#33374:
>
>     <http://issues.guix.gnu.org/issue/33374>
>
>
> On Wed, 14 Nov 2018 at 09:21, swedebugia <swedebugia@riseup.net> wrote:
>> Date: Fri, 09 Nov 2018 02:13:43 -0500

> From my point of the view, this submission should be for the Cookbook.

Well, no answer.  Therefore, I am closing.  If I am missing, feel free
to reopen.


Cheers,
simon




^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-05-19 21:37 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11 19:11 Ever-growing store with --gc-keep-outputs? Pierre Neidhardt
2018-09-12 10:55 ` Pierre Neidhardt
2018-09-13  9:09 ` Ludovic Courtès
2018-09-13  9:32   ` Pierre Neidhardt
2018-09-14  9:51     ` Ludovic Courtès
2018-09-14 10:57       ` Pierre Neidhardt
2018-09-14 17:46         ` Mark H Weaver
2018-09-14 18:02           ` Pierre Neidhardt
2018-09-14 21:34             ` Mark H Weaver
2018-09-14 22:10               ` Pierre Neidhardt
2018-11-09  6:53           ` swedebugia
2018-11-09  7:13             ` Mark H Weaver
2018-11-09 10:58               ` Pierre Neidhardt
2018-11-09 16:47                 ` swedebugia
2018-11-13 20:31                   ` Leo Famulari
2018-11-13 21:14                     ` swedebugia
2018-11-14  8:21               ` [bug#33374] [PATCH] doc: guix: Inform about deleting old system generations swedebugia
2019-01-03 16:24                 ` swedebugia
2022-04-07 11:56                 ` zimoun
2022-05-19 21:28                   ` zimoun

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.