When I try to run
nix store gc, the process gets hung up on a missing path:
Oct 02 22:05:09 prod-vm-hydra-main-01 systemd: Starting store-gc.service... Oct 02 22:05:09 prod-vm-hydra-main-01 store-gc-start: finding garbage collector roots... Oct 02 22:05:55 prod-vm-hydra-main-01 store-gc-start: deleting garbage... Oct 02 22:06:05 prod-vm-hydra-main-01 store-gc-start: deleting '/nix/store/gjvhbn3baqvfyfa5zxmkfr9kqbdxsyf9-source.drv' Oct 02 22:24:55 prod-vm-hydra-main-01 store-gc-start: error: opening file '/nix/store/7fbky8800qx2s7a1mh15a28cpy7cwbva-navigation_msgs-setup.sh.drv': No such file or directory
This path is intermediate build garbage, so the system doesn’t know how to build or substitute it. I expect this came about due to a previous, interrupted GC run, and IMO a subsequent one should be able to quietly pick up the pieces— recognize that the path is not needed, is already gone, and should simply be removed from the sqlite DB with no further drama.
In the meantime, though, is there some sequence of commands I can use to correct this? On a non-NixOS machine I’d probably just
touch the missing path to give
nix store delete something to remove, but I can’t do that on NixOS without remounting the store, which I’d really rather not do. Plus, I’m hoping there’s a better way.