[Nix-dev] unable to delete a store path

Mathijs Kwik mathijs at bluescreen303.nl
Wed Sep 26 13:42:20 CEST 2012


On Wed, Sep 26, 2012 at 1:21 PM, Shea Levy <shea at shealevy.com> wrote:
> On 09/26/2012 07:12 AM, Mathijs Kwik wrote:
>>
>> On Wed, Sep 26, 2012 at 12:36 PM, Shea Levy<shea at shealevy.com>  wrote:
>>>
>>> On 09/26/2012 06:01 AM, Mathijs Kwik wrote:
>>>>
>>>> Hi all,
>>>>
>>>> I have a store path that seems to refer to itself only, but I can't
>>>> delete
>>>> it.
>>>> How can I proceed?
>>>>
>>>>
>>>> mathijs at bluebook nixos% nix-store --query --referrers-closure
>>>> /nix/store/q6qapspkz2g4jlgnagiabrfvw32say9v-xine-lib-1.2.2
>>>> /nix/store/q6qapspkz2g4jlgnagiabrfvw32say9v-xine-lib-1.2.2
>>>>
>>>> mathijs at bluebook nixos% nix-store --query --roots
>>>> /nix/store/q6qapspkz2g4jlgnagiabrfvw32say9v-xine-lib-1.2.2
>>>
>>>
>>> There's your answer. You need to remove the gcroot (most likely something
>>> in
>>> /nix/var/nix/gcroots or a subdirectory) pointing to this path before
>>> deleting it.
>>
>> I think you mis-read my paste.
>> "nix-store --query --roots /nix/store/..." is my input, it's all on
>> the same line
>> there is no output from the command itself
>
>
> Ah, sorry. Can you check if the xine-lib path is in `nix-store --gc
> --print-live`, and also see if anything in `nix-store --gc --print-roots`
> might be the culprit? nix-store --query --roots should show it, but...

for i in $(nix-store --gc --print-roots | cut -f1 -d\ ); do
  nix-store --query -R $i | grep xine-lib
done

gives nothing


% nix-store --gc --print-live | grep xine-lib
finding garbage collector roots...
determining live/dead paths...
/nix/store/7qwd71k9p11cp2jnqmz5f1wg618144j7-xine-lib-1.2.2.tar.xz
/nix/store/9hxbkbg1kdw2rcaqagzcc7y0hn6yngfh-xine-lib-1.2.2.drv
/nix/store/q6qapspkz2g4jlgnagiabrfvw32say9v-xine-lib-1.2.2
/nix/store/vjhhh3kyw0gfglhzzlbq4r3b2jg1rild-xine-lib-1.2.2.tar.xz.drv

So there it is, seemingly alive, but only referring to itself.
The other 3 items don't seem te reference it.

>
>
>>>> mathijs at bluebook nixos% nix-store --delete
>>>> /nix/store/q6qapspkz2g4jlgnagiabrfvw32say9v-xine-lib-1.2.2
>>>> finding garbage collector roots...
>>>> error: cannot delete path
>>>> `/nix/store/q6qapspkz2g4jlgnagiabrfvw32say9v-xine-lib-1.2.2' since it
>>>> is still alive
>>>> 0 store paths deleted, 0.00 MiB freed
>>>> _______________________________________________
>>>> nix-dev mailing list
>>>> nix-dev at lists.science.uu.nl
>>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>>
>>>
>


More information about the nix-dev mailing list