unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* How to remove old (test) builds from store?
@ 2016-06-02 10:14 Hartmut Goebel
  2016-06-02 11:10 ` 宋文武
  0 siblings, 1 reply; 9+ messages in thread
From: Hartmut Goebel @ 2016-06-02 10:14 UTC (permalink / raw)
  To: help-guix

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?

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

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

* Re: How to remove old (test) builds from store?
  2016-06-02 10:14 How to remove old (test) builds from store? Hartmut Goebel
@ 2016-06-02 11:10 ` 宋文武
  2016-06-02 11:35   ` Hartmut Goebel
  2016-06-02 12:02   ` Ludovic Courtès
  0 siblings, 2 replies; 9+ messages in thread
From: 宋文武 @ 2016-06-02 11:10 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: help-guix

Hartmut Goebel <h.goebel@crazy-compilers.com> 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

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

* Re: How to remove old (test) builds from store?
  2016-06-02 11:10 ` 宋文武
@ 2016-06-02 11:35   ` Hartmut Goebel
  2016-06-02 12:02   ` Ludovic Courtès
  1 sibling, 0 replies; 9+ messages in thread
From: Hartmut Goebel @ 2016-06-02 11:35 UTC (permalink / raw)
  To: 宋文武; +Cc: help-guix

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

Am 02.06.2016 um 13:10 schrieb 宋文武:
> I think call gc for each one will work, eg:
>
> for i in /gnu/store/*teensy*; do guix gc -d $i; done

Thanks for this tip. It is slow but works :-)

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |


[-- Attachment #2: Type: text/html, Size: 1103 bytes --]

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

* Re: How to remove old (test) builds from store?
  2016-06-02 11:10 ` 宋文武
  2016-06-02 11:35   ` Hartmut Goebel
@ 2016-06-02 12:02   ` Ludovic Courtès
  2016-06-02 12:51     ` Hartmut Goebel
  1 sibling, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2016-06-02 12:02 UTC (permalink / raw)
  To: 宋文武; +Cc: help-guix

iyzsong@member.fsf.org (宋文武) skribis:

> Hartmut Goebel <h.goebel@crazy-compilers.com> 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’.

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

* Re: How to remove old (test) builds from store?
  2016-06-02 12:02   ` Ludovic Courtès
@ 2016-06-02 12:51     ` Hartmut Goebel
  2016-06-02 12:56       ` Thompson, David
  0 siblings, 1 reply; 9+ messages in thread
From: Hartmut Goebel @ 2016-06-02 12:51 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

Am 02.06.2016 um 14:02 schrieb Ludovic Courtès:
> Alternately (ah ha!):
>
>   guix gc -d $(guix build foo)

This would build remove the packages just build, wouldn't it? But I want
to clean up old test builds

It's not about determinism and not about free disk-space :-) It's just
about removing stuff which I know is outdated.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

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

* Re: How to remove old (test) builds from store?
  2016-06-02 12:51     ` Hartmut Goebel
@ 2016-06-02 12:56       ` Thompson, David
  2016-06-02 13:27         ` Hartmut Goebel
  0 siblings, 1 reply; 9+ messages in thread
From: Thompson, David @ 2016-06-02 12:56 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: help-guix

On Thu, Jun 2, 2016 at 8:51 AM, Hartmut Goebel
<h.goebel@crazy-compilers.com> wrote:
> Am 02.06.2016 um 14:02 schrieb Ludovic Courtès:
>> Alternately (ah ha!):
>>
>>   guix gc -d $(guix build foo)
>
> This would build remove the packages just build, wouldn't it? But I want
> to clean up old test builds
>
> It's not about determinism and not about free disk-space :-) It's just
> about removing stuff which I know is outdated.

Then just run 'guix gc' and it will remove everything that isn't
currently included in a profile.

- Dave

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

* Re: How to remove old (test) builds from store?
  2016-06-02 12:56       ` Thompson, David
@ 2016-06-02 13:27         ` Hartmut Goebel
  2016-06-02 15:22           ` Leo Famulari
  2016-06-02 21:06           ` Ludovic Courtès
  0 siblings, 2 replies; 9+ messages in thread
From: Hartmut Goebel @ 2016-06-02 13:27 UTC (permalink / raw)
  Cc: help-guix

Am 02.06.2016 um 14:56 schrieb Thompson, David:
> Then just run 'guix gc' and it will remove everything that isn't
> currently included in a profile.

This would remove much too much :-)

I have quite some package to work on, including those with patches
pending for inclusion. The dependencies of these packages are not in a
profile (yet). Now when running `guix gc`, many packages need to be
downloaded again a few minutes later.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

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

* Re: How to remove old (test) builds from store?
  2016-06-02 13:27         ` Hartmut Goebel
@ 2016-06-02 15:22           ` Leo Famulari
  2016-06-02 21:06           ` Ludovic Courtès
  1 sibling, 0 replies; 9+ messages in thread
From: Leo Famulari @ 2016-06-02 15:22 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: help-guix

On Thu, Jun 02, 2016 at 03:27:37PM +0200, Hartmut Goebel wrote:
> Am 02.06.2016 um 14:56 schrieb Thompson, David:
> > Then just run 'guix gc' and it will remove everything that isn't
> > currently included in a profile.
> 
> This would remove much too much :-)
> 
> I have quite some package to work on, including those with patches
> pending for inclusion. The dependencies of these packages are not in a
> profile (yet). Now when running `guix gc`, many packages need to be
> downloaded again a few minutes later.

This does not directly address your original question, but you should
consider running a substitutes mirror locally. I do this, and it speeds
things up considerably.

Of course, in its default configuration, the mirror only mirrors things
that ultimately come from hydra.gnu.org.

If interested, clone the 'maintenance' repo [0] and adapt the file
'hydra/nginx/mirror.conf' to your needs.
 
[0] https://savannah.gnu.org/git/?group=guix

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

* Re: How to remove old (test) builds from store?
  2016-06-02 13:27         ` Hartmut Goebel
  2016-06-02 15:22           ` Leo Famulari
@ 2016-06-02 21:06           ` Ludovic Courtès
  1 sibling, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2016-06-02 21:06 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: help-guix

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> Am 02.06.2016 um 14:56 schrieb Thompson, David:
>> Then just run 'guix gc' and it will remove everything that isn't
>> currently included in a profile.
>
> This would remove much too much :-)

I usually run ‘guix gc -F 4G’ or similar, which removes just as much as
needed.  That works rather well for me.

> I have quite some package to work on, including those with patches
> pending for inclusion. The dependencies of these packages are not in a
> profile (yet). Now when running `guix gc`, many packages need to be
> downloaded again a few minutes later.

They “need” to be downloaded again only if you want to rebuild them,
yet without adding them to a profile or making them a GC root.  :-)

When needed, you can explicitly protect things from GC using profiles,
or using ‘guix build -r’.

Ludo’.

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

end of thread, other threads:[~2016-06-02 21:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-02 10:14 How to remove old (test) builds from store? Hartmut Goebel
2016-06-02 11:10 ` 宋文武
2016-06-02 11:35   ` Hartmut Goebel
2016-06-02 12:02   ` Ludovic Courtès
2016-06-02 12:51     ` Hartmut Goebel
2016-06-02 12:56       ` Thompson, David
2016-06-02 13:27         ` Hartmut Goebel
2016-06-02 15:22           ` Leo Famulari
2016-06-02 21:06           ` Ludovic Courtès

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