help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guix gc, any way to delete only packages that aren't required to bui


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
User-agent: mu4e 1.0; emacs 26.1

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’t be
collected.  For example:

    guix environment --root=$HOME/.dev-env guile

Then you can run “guix gc” with reckless abandon and be sure that at
least the dependencies of the “guile” package (at that particular
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[=yes/no]
                tell whether the GC must keep derivations
                corresponding to live outputs

Hope this helps!

--
Ricardo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]