nix-installer
nix-installer copied to clipboard
Uninstall errored because Sequoia upgrade deleted _nixbld1-4
Error
Error:
0: Error reverting
0: Action `create_or_merge_nix_config` errored
Remove file `/etc/nix/nix.conf`
Action `create_users_and_group` errored
Multiple child errors
Action `create_user` errored
Failed to execute command with status 185 `"/usr/bin/dscl" "." "-delete" "/Users/_nixbld1"`, stdout: delete: Invalid Path
stderr: <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)
Action `create_user` errored
Failed to execute command with status 185 `"/usr/bin/dscl" "." "-delete" "/Users/_nixbld2"`, stdout: delete: Invalid Path
stderr: <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)
Action `create_user` errored
Failed to execute command with status 185 `"/usr/bin/dscl" "." "-delete" "/Users/_nixbld3"`, stdout: delete: Invalid Path
stderr: <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)
Action `create_user` errored
Failed to execute command with status 185 `"/usr/bin/dscl" "." "-delete" "/Users/_nixbld4"`, stdout: delete: Invalid Path
stderr: <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)
Action `create_apfs_volume` errored
Failed to execute command with status 1 `"/usr/sbin/diskutil" "apfs" "deleteVolume" "Nix Store"`, stdout: Started APFS operation
Deleting APFS Volume from its APFS Container
Unmounting disk3s7
The volume "Nix Store" on disk3s7 couldn't be unmounted because it is in use by process 651 (securityd)
stderr: Error: -69888: Couldn't unmount disk
Metadata
| key | value |
|---|---|
| version | 0.19.0 |
| os | macos |
| arch | aarch64 |
I did not run the repair before upgrading to Sequoia. Trying to use any nix command resulted in user conflict error being reported.
I uninstalled nix-darwin using the local uninstaller command darwin-uninstaller, which produced the following output
user defaults...
setting up user launchd services...
setting up /Applications/Nix Apps...
setting up pam...
applying patches...
setting up /etc...
system defaults...
setting up launchd services...
removing service org.nixos.activate-system
removing service org.nixos.nix-daemon
configuring networking...
setting up /Library/Fonts/Nix Fonts...
setting nvram variables...
rm: cannot remove '/Library/LaunchDaemons/org.nixos.nix-daemon.plist': No such file or directory
grep: /etc/bashrc: No such file or directory
Found no nix-daemon.sh reference in /etc/bashrc
add this snippet back to /etc/bashrc:
# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix
NOTE: The /nix/var/nix/profiles/system* profiles still exist and won't be garbage collected.
Done!
After which, running /nix/nix-installer uninstall produced the autogenerated issue above.
I see that my situation is somewhat similar to https://github.com/DeterminateSystems/nix-installer/issues/1193.