iyzs...@member.fsf.org (宋文武) skribis: > Hartmut Goebel <h.goe...@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’.