Skip to content

sudo /nix/nix-installer uninstall fails due to detecting nix-darwin, even though nix-darwin was already uninstalled #150

@mitchmindtree

Description

@mitchmindtree

Following #149, I thought I'd try to reinstall determinate-nix with --prefer-upstream-nix.

When running the installer again it asks to first "try uninstalling the existing install with /nix/nix-installer uninstall".

I run sudo /nix/nix-installer uninstall, it says "nix-darwin installation detected, it must be removed before uninstalling Nix".

I run sudo darwin-uninstaller, it seems to complete with the following:

Proceed? [y/n] y
setting up /run via /etc/synthetic.conf...
failed to stitch firmlinks and/or create synthetics for root volume (c002) ...
setting up /Applications/Nix Apps...
warning: /Applications/Nix Apps is not owned by nix-darwin, skipping App linking...
setting up pam...
applying patches...
setting up /etc...
setting up launchd services...
configuring networking...
configuring power...
setting up /Library/Fonts/Nix Fonts...
setting nvram variables...
warning: nix-channel is deprecated in favor of flakes in Determinate Nix. See https://zero-to-nix.com for a guide to Nix flakes. For details and to offer feedback on the deprecation process, see: https://github.com/DeterminateSystems/nix-src/issues/34.
warning: selector 'darwin' matched no installed derivations
NOTE: the /run symlink will be removed on reboot
NOTE: The /nix/var/nix/profiles/system* profiles still exist and won't be garbage collected.

Done!

I run sudo /nix/nix-installer uninstall, it again fails with:

% sudo /nix/nix-installer uninstall
 INFO nix-installer v3.13.2
 INFO nix-installer v3.13.2
`nix-darwin` installation detected, it must be removed before uninstalling Nix. Please refer to https://github.com/LnL7/nix-darwin#uninstalling for instructions how to uninstall `nix-darwin`.

I restart the machine in case some daemon is still running or something, alas running sudo /nix/nix-installer uninstall still gives the same error.

I'm about to start reading the source of the uninstaller so I can see exactly what is left over that the uninstaller is not happy with.

I'm mostly sharing to keep track of my progress in case it helps someone else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions