[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
Mark H Weaver
Re: guix gc, any way to delete only packages that aren't required to build anything?
Fri, 30 Nov 2018 15:29:23 -0500
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Pierre Neidhardt <address@hidden> writes:
> I've been bugged by this as well (see
> https://lists.gnu.org/archive/html/help-guix/2018-09/msg00028.html). There
> a few options beside Ricardo's suggestion:
> - You can start the Guix daemon with --gc-keep-outputs (see "(guix) Invoking
> guix-daemon" in the manual). This will never delete anything that is still
> required, but this leads to an ever-growing store. If you've got limited
> storage space, you might not want this.
On my GuixSD system where substitutes are completely disabled and I
build everything locally, I've been running my Guix daemon with both
--gc-keep-derivations=yes and --gc-keep-outputs=yes for years. Here's
the relevant excerpt of my OS config:
(services (cons* <... my custom services here ...>
(modify-services (remove (lambda (svc)
(eq? (service-kind svc)
This configuration allows me to run "guix gc" without losing the
dependencies that are needed to build the packages that are currently
protected by GC roots, e.g. the packages in my profiles and system
generations. It's not perfect: I lose a few packages apparently related
to grafts, but it's not too much in practice, and I can manually add
more GC roots to handle those cases.
Contrary to what Pierre wrote above, I've found that the use of these
flags certainly does _not_ lead to an ever-growing store. On my GNOME 3
GuixSD system, my store requires ~30 gigabytes, and as long as I trim my
older profiles and system generations regularly, the space requirements
are fairly stable over time.