help-guix
[Top][All Lists]
Advanced

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

Re: How to remove old (test) builds from store?


From: Ludovic Courtès
Subject: Re: How to remove old (test) builds from store?
Date: Thu, 02 Jun 2016 14:02:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

address@hidden (宋文武) skribis:

> Hartmut Goebel <address@hidden> writes:
>
>> Hi,
>>
>> when creating packages and refining the build step by step, I end up
>> with many entries in the store I do not need. When tying to delete them,
>> only a few are removed and many are kept. E.g:
>>
>>
>> # guix gc -d /gnu/store/*teensy*
>> finding garbage collector roots...
>> deleting `/gnu/store/…-teensy-loader-cli-2.1-1.f289b7a.drv'
>> deleting `/gnu/store/…-teensy-loader-cli-2.1-1.f289b7a.tar.xz.drv'
>> guix gc: error: build failed: cannot delete path
>> `/gnu/store/…-teensy-loader-cli-2.1-1.f289b7a.tar.gz.drv' since it is
>> still alive
>> $ ls -d /gnu/store/*teensy* | wc -l
>> 35
>>
>> The one still alive if okay, since I have an older version of this
>> package installed in my current environment.
>>
>>
>> How do I get rid of these ca. 30 outdated store items?
> I think call gc for each one will work, eg:
>
> for i in /gnu/store/*teensy*; do guix gc -d $i; done

Alternately (ah ha!):

  guix gc -d $(guix build foo)

In general, doing this only makes sense if you know that the build
process of ‘foo’ is non-deterministic.

If you want to check for determinism, you can simply run this instead:

  guix build foo --check

In other cases, it’s enough to run, say:

  guix gc -F 5G

once in a while to make sure that you have 5 GiB free on your disk.

HTH,
Ludo’.



reply via email to

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