Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request for uninstaller #2509

Open
coretemp opened this issue Nov 2, 2018 · 10 comments
Open

Feature request for uninstaller #2509

coretemp opened this issue Nov 2, 2018 · 10 comments

Comments

@coretemp
Copy link

coretemp commented Nov 2, 2018

People have been enthusiastic in writing various installers, but no well written uninstaller has been written. I also wrote various low quality versions of this based on comments like "delete the folowing directories"/"delete the nixbuild users, etc." that on a superficial level seem to work, but life would be much easier for a lot of people if a command would be made available that would really remove nix.

The preferred interface for such an uninstaller is to simply pass --uninstall to the installer. I am not so much interested in discussion of the specific interface as long as it becomes possible to uninstall nix and then reinstall nix on a variety of platforms (CentOS/Debian/Ubuntu/macOS).

I also don't understand the reason for choosing to document how to uninstall as opposed to automation. Not providing an uninstaller provides a breeding ground for FUD making people scared to try out Nix (I have seen that over and over).

To make it credible that it actually works, the installer and uninstaller would have to be tested as part of standard release procedures.

@edolstra
Copy link
Member

edolstra commented Nov 2, 2018

Maybe add a nix uninstall-nix command that nukes /nix, the build users etc.? Seems better than having it as an installer flag since you might not have the installer anymore.

@coretemp
Copy link
Author

coretemp commented Nov 2, 2018

The way I would like to see it implemented is something that doesn't depend on a lot of things working. So, there would be a nix wrapper and that nix wrapper would run the more complex C++ binary (that can break for libraries not working or whatever). One of the options in the nix wrapper would be the uninstall-nix flag. This way, no matter how awful the system looks or what people did, it still works.

If this is still not reliable enough, you can also add a fallback implementation in the C++ binary. That way I expect it to always work.

As indicated I don't care about the specific details of the implementation as long as it is implemented in such a way that if I do a Google search for "uninstall Nix broken" that there no results for the past three years and I expect that to be completely doable (for example in the way I described above). You could also just start with implementing just the C++ version, since I expect that's what you would prefer and optimistically would believe to already achieve that goal (I do not share that vision).

@ghost
Copy link

ghost commented Jan 23, 2019

Relates to #1608

@expelledboy
Copy link

I had a crack at doing one for OSx.

@uri-canva
Copy link

This is even more useful / important now that with catalina a volume is required.

cc @LnL7

@PandaWhisperer
Copy link

Just dropped by looking for this. Wanted to try out Nix and basically messed up everything right away. I was looking for a way to nuke my installation and start over, but, not only is there no uninstaller, there is not even a section in the manual that describes how to manually uninstall it.

At least the installer lists the steps required to remove the APFS volume... but that's it. Doesn't explain how to do anything else. I referred to @expelledboy's script for other steps to run, but at least half of those didn't apply to me because I did the single user installation, not multi-user.

@expelledboy
Copy link

At least the installer lists the steps required to remove the APFS volume... but that's it. Doesn't explain how to do anything else. I referred to @expelledboy's script for other steps to run, but at least half of those didn't apply to me because I did the single user installation, not multi-user.

@PandaWhisperer The single user uninstall is much more simple, as it doesnt try and replace files in your environment. If you look at the script it actually does a single user cleanup first, and then removes other files installed into your environment by the daemon installer.

@stale
Copy link

stale bot commented Feb 12, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 12, 2021
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/anyone-up-for-picking-at-some-nix-onboarding-improvements/13152/6

@stale stale bot removed the stale label Jun 2, 2021
@stale
Copy link

stale bot commented Jan 8, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants