From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: How to remove old (test) builds from store? Date: Thu, 02 Jun 2016 14:02:35 +0200 Message-ID: <87fusv94tg.fsf@gnu.org> References: <575006ED.6000607@crazy-compilers.com> <87k2i7q223.fsf@member.fsf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8RKn-0001qg-7W for help-guix@gnu.org; Thu, 02 Jun 2016 08:02:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8RKj-0006GV-3P for help-guix@gnu.org; Thu, 02 Jun 2016 08:02:44 -0400 In-Reply-To: <87k2i7q223.fsf@member.fsf.org> (=?utf-8?B?IuWui+aWh+atpiIn?= =?utf-8?B?cw==?= message of "Thu, 02 Jun 2016 19:10:12 +0800") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: =?utf-8?B?5a6L5paH5q2m?= Cc: help-guix@gnu.org iyzsong@member.fsf.org (=E5=AE=8B=E6=96=87=E6=AD=A6) skribis: > Hartmut Goebel 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/=E2=80=A6-teensy-loader-cli-2.1-1.f289b7a.drv' >> deleting `/gnu/store/=E2=80=A6-teensy-loader-cli-2.1-1.f289b7a.tar.xz.dr= v' >> guix gc: error: build failed: cannot delete path >> `/gnu/store/=E2=80=A6-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 =E2=80=98foo=E2=80=99 is non-deterministic. If you want to check for determinism, you can simply run this instead: guix build foo --check In other cases, it=E2=80=99s enough to run, say: guix gc -F 5G once in a while to make sure that you have 5=C2=A0GiB free on your disk. HTH, Ludo=E2=80=99.