Is it safe to delete any `result` symlinks?

Hi, I am maintaining a NixOS server, and I am trying to reduce the size of the nix store. According to Storage optimization - NixOS Wiki I can delete any result symlinks. But I wanted to be sure before deleting it since if I am wrong this not something I can rollback. I have the following symlinks:

/etc/nginx/result -> ...
/etc/nixos/result -> ...

Are those safe to delete?

My guess is they are, since if they are referenced in my current profile the store content won’t be deleted even if I remove those roots, otherwise they will. But still wanted to confirm.

Generally yes, the one in /etc/nixos is the result of running nixos-rebuild build or something similar at one point.

The one in /etc/nginx is a little unexpected, that’s not normally somewhere
I’d expect a nix build to be run, but if you recognise why it’s there, fine.

2 Likes