Some time ago I had network.enableRollback = true on my laptop but then decided that I don't really need this because I naturally have full physical access to this machine, so I set network.enableRollback = true.
Over time I started running low on disk space but I could not garbage collect large parts of the store that seemed to be unused. Eventually I found that all of these were referred to by some old generation that should have been garbage collected months ago. Following the referrers led me to /nix/var/nix/profiles/per-user/root/nixops/ where there was a link left to an ancient generation. Deleting this link and a subsequent nix-collect-garbage freed 16 GB of disk space.
I don't know whether there is an easy way to trigger removal of old profiles when disabling rollbacks but at least this should be documented that when setting network.enableRollback from true to false old generations have to be taken care of manually.
Some time ago I had
network.enableRollback = true
on my laptop but then decided that I don't really need this because I naturally have full physical access to this machine, so I setnetwork.enableRollback = true
.Over time I started running low on disk space but I could not garbage collect large parts of the store that seemed to be unused. Eventually I found that all of these were referred to by some old generation that should have been garbage collected months ago. Following the referrers led me to
/nix/var/nix/profiles/per-user/root/nixops/
where there was a link left to an ancient generation. Deleting this link and a subsequentnix-collect-garbage
freed 16 GB of disk space.I don't know whether there is an easy way to trigger removal of old profiles when disabling rollbacks but at least this should be documented that when setting
network.enableRollback
fromtrue
tofalse
old generations have to be taken care of manually.