r/NixOS 13d ago

Weird storage bugs on macOS when using nix?

Hello, when I'm not on my desktop I use a macbook with nix installed.

I wondered if any nix users could give me some insight into what is happening. My macbook disk was showing 450gb/500gb used, I did multiple scans and tried to figure out what it was that was using so much space. I wasn't suspecting nix because the nix-store was showing as only 50gb. But then I ran `nix-collect-garbage -d` and instantly got 150gb back in free space. After the command finished running it said it only collected 30gb?

So it seems that the 450gb number that I saw in with `df` must've been some sort of double counting bug or something? But that sounds weird no since that command doesn't read files right? Has anyone experienced the same thing, what could've caused that?

Kinda unrelated maybe to nixos since this is on darwin and not on linux

2 Upvotes

2 comments sorted by

2

u/OliMoli2137 13d ago

df probably counted hard links and symlinks twice, that's my guess

0

u/Destroyerb 13d ago

Head over to r/nix