-
-
Notifications
You must be signed in to change notification settings - Fork 477
Deleting old generations
c4710n edited this page Oct 26, 2020
·
1 revision
Run nix-collect-garbage -d
as normal.
TLDR: sudo nix-collect-garbage -d
On a multi user installation permissions of profiles is split between root and per user profiles. In this case the root profile manages the version of nix that's installed. Only per user profiles are owned by each user respectively so packages can be installed without privileges. The nix-darwin system profile also falls under root since it takes a similar place as the initial root profile.
The darwin-rebuild
command automatically uses sudo
in the appropriate places when switching to a new system, but nix-collect-garbage
doesn't and thus won't have permissions to touch the system generations unless executed with sudo
explicitly.