I’ve got a raspberry pi, where I misconfigured the periodic garbage collect, and no garbage has been taken out for a few months.
/nix/store is occupying 100% of the available inodes:
Filesystem Inodes IUsed IFree IUse% Mounted on ... /dev/mmcblk0p2 1888768 1888768 0 100% / /dev/mmcblk0p2 1888768 1888768 0 100% /nix/store ...
This is causing all sorts of chaos. Most importantly, nix commands fail, including nix-collect-garbage:
# nix-collect-garbage --delete-old removing old generations of profile /nix/var/nix/profiles/per-user/root/channels error: opening lock file '/nix/var/nix/profiles/per-user/root/channels.lock': No space left on device
Rebooting, and, e.g., deleting the content of /tmp changed the symptoms a bit, but did not succeed in fixing the problem.
Apparently I need to delete a few /nix/store paths before I can execute nix-collect-garbage again. /nix/store is mounted read-only though, and I don’t know enough about the inner workings of nix to figure out whether deleting random store paths manually is a good idea anyways.
Can somebody help me figure out what my options are, besides reinstalling the system from scratch?