[Nix-dev] unable to delete a store path

Shea Levy shea at shealevy.com
Wed Sep 26 14:10:51 CEST 2012


On 09/26/2012 08:07 AM, Mathijs Kwik wrote:
> On Wed, Sep 26, 2012 at 1:55 PM, Shea Levy<shea at shealevy.com>  wrote:
>> If you do give up, before manually deleting it try nix-store --delete
>> --ignore-liveness. That bypasses gcroots but fails if there's another path
>> in the path's referrers (so it shouldn't fail in your case, but it might
>> since this seems like a bug).
> Now it gets even weirder. I tried a normal --delete again and it worked!
> With some output though:
> ~% nix-store --delete /nix/store/q6qapspkz2g4jlgnagiabrfvw32say9v-xine-lib-1.2.2
> finding garbage collector roots...
> removing stale link from
> `/nix/var/nix/gcroots/auto/lplg6g967ms0j3dvlsdq7am7iqa9vamh' to
> `/tmp/nix-build.WKZR3u/result'
> removing stale link from
> `/nix/var/nix/gcroots/auto/yfjm7r5hfa2hfizqmllhyr0z25igwnwx' to
> `/tmp/nix-build.aMDbJE/result'
> removing stale link from
> `/nix/var/nix/gcroots/auto/pyxwi92798bh8fzk5l1hs97yhfhk0prw' to
> `/tmp/nix-build.jrGerR/result'
> removing stale link from
> `/nix/var/nix/gcroots/auto/cabj712wjp6xq2p9i9k4i80sjv0m475i' to
> `/tmp/nix-build.o57rAD/derivation'
> removing stale link from
> `/nix/var/nix/gcroots/auto/hc4wifhj2vgxwn1psngn3avpwbapqfxk' to
> `/tmp/nix-build.VCPc_z/result'
> removing stale link from
> `/nix/var/nix/gcroots/auto/xiv7rnq7bhnbbbvv5gslvkzm9yn3820k' to
> `/tmp/nix-build.WKZR3u/derivation'
> removing stale link from
> `/nix/var/nix/gcroots/auto/0kn7llb10pfyjgqliap4lcn8a03vb5kv' to
> `/tmp/nix-build.VCPc_z/derivation'
> removing stale link from
> `/nix/var/nix/gcroots/auto/0j0lpqh6mq9kpi1lrirlfxq26q7zxh54' to
> `/tmp/nix-build.Zv7p2Q/result'
> removing stale link from
> `/nix/var/nix/gcroots/auto/6bg5afp1sw1f490il4ji8pn8495ww712' to
> `/tmp/nix-build.jrGerR/derivation'
> removing stale link from
> `/nix/var/nix/gcroots/auto/b1z1kmlwk1q8qndgs39xfsdfb78gnklv' to
> `/tmp/nix-build.Zv7p2Q/derivation'
> removing stale link from
> `/nix/var/nix/gcroots/auto/4hawd1693c6vwdbrijm4blr3703nsk53' to
> `/tmp/nix-build.o57rAD/result'
> removing stale link from
> `/nix/var/nix/gcroots/auto/nzkfzlimxk99ylrka45xgzhwwqjayvql' to
> `/tmp/nix-build.aMDbJE/derivation'
> invalidating `/nix/store/q6qapspkz2g4jlgnagiabrfvw32say9v-xine-lib-1.2.2'
> deleting `/nix/store/q6qapspkz2g4jlgnagiabrfvw32say9v-xine-lib-1.2.2-gc-5066'
> deleting unused links...
> note: currently hard linking saves 486.02 MiB
> 1 store paths deleted, 7.93 MiB freed
>
>
> This is very strange. Apart from trying the commands you and Marc gave
> me to try, I haven't performed any nix-actions since I reported my
> problem.
> Somehow these auto-gcroots are now freed?

IIUC that stale link stuff is for indirect gcroots whose targets have 
disappeared. Since most of those targets are in /tmp/nix-build*, perhaps 
you were in the middle of a build before and that's why the path was kept?


More information about the nix-dev mailing list