unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Matthew Brooks <matthewfbrooks@mailbox.org>
Cc: "help-guix@gnu.org" <help-guix@gnu.org>
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	[thread overview]
Message-ID: <878t1b2lj1.fsf@elephly.net> (raw)
In-Reply-To: <20181129210707.3dbf5f5a@mailbox.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’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	other threads:[~2018-11-30  5:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30  3:07 guix gc, any way to delete only packages that aren't required to build anything? Matthew Brooks
2018-11-30  5:15 ` Ricardo Wurmus [this message]
2018-11-30  8:54   ` Pierre Neidhardt
2018-11-30 20:29     ` Mark H Weaver
2018-11-30 23:14       ` Pierre Neidhardt
2018-12-01  5:13         ` Mark H Weaver
2018-12-01 13:49       ` Joshua Branson
2018-12-03  2:16         ` Mark H Weaver
2018-12-03  2:50           ` Mark H Weaver
2018-12-03 18:06           ` Joshua Branson
2018-12-10 10:27             ` Pierre Neidhardt
2018-12-11 19:40       ` George Clemmer
2018-12-12 10:38         ` Mark H Weaver
2018-12-12 23:10           ` George Clemmer
2019-01-09 19:03       ` George Clemmer
2018-12-02 14:16 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878t1b2lj1.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=help-guix@gnu.org \
    --cc=matthewfbrooks@mailbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).