nix-installer icon indicating copy to clipboard operation
nix-installer copied to clipboard

Error on trying to uninstall nix: Remove file `/etc/nix/nix.conf`

Open avaz opened this issue 1 year ago • 2 comments

Tried to uninstall Nix and got the error bellow.

More context:

  • installed nix on MacOS Ventura
  • updated MacOS to Sequoia 15.1 beta
  • nix stoped working due issues with user groups, manually changed the groups to something else and nix started working again
  • ran determinate systems script to prepare nix to MacOS Sequoia
  • tried to uninstall nix and got the error

Based on the uninstall logs it seems that nix was uninstalled. I'm reporting this because the logs recommended in do so.

Error

 INFO Revert: Remove directory `/nix/temp-install-dir`
 INFO Revert: Configure Nix daemon related settings with launchctl
 INFO Revert: Create a `launchctl` plist to put Nix into your PATH
 INFO Revert: Configuring zsh to support using Nix in non-interactive shells
 INFO Revert: Configure Nix
 INFO Revert: Configure Time Machine exclusions
 INFO Revert: Create build users (UID 361-392) and group (GID 360)
 INFO Revert: Provision Nix
 INFO Revert: Create an encrypted APFS volume `Nix Store` for Nix on `disk3` and add it to `/etc/fstab` mounting on `/nix`
ERROR Uninstallation complete, some errors encountered
Error: 
   0: Error reverting
   0: Action `create_or_merge_nix_config` errored
      Remove file `/etc/nix/nix.conf`

Location:
   src/cli/subcommand/uninstall.rs:192

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

Metadata

key value
version 0.19.0
os macos
arch aarch64

avaz avatar Sep 21 '24 17:09 avaz

Interesting. Did /etc/nix/nix.conf exist when the uninstaller failed to remove it? Or was it maybe removed before you ran the uninstaller?

cole-h avatar Sep 23 '24 14:09 cole-h

Hey @cole-h I can't recollect that unfortunately. I ended up managing to uninstall nix by actually reinstalling it and then running the uninstall again if that helps.

avaz avatar Oct 03 '24 23:10 avaz