How to unistalling NixOS 24.05?

Hello everyone.
i have a problem related to how to be able to uninstall version 24.05.
premise: i installed it just to try it and it is definitely good, functional and great!
however it is not what i was looking for and i desperately need to uninstall it.
the installation tool is very effective but there is no uninstall tool.
how can i do?

This might help if you talk about Nix on an other system: Uninstalling Nix - Nix Reference Manual

If you really mean NixOS then you just reinstall your previous OS.

In the facts, I installed NixOS on a laptop, alongside another operating system (a Linux Mint).
You are saying that I must, therefore, run those commands from Linux Mint?

There are no commands to uninstall an OS. You simply delete it or install over it.

Just make sure you are actively using the bootloader of the other OS first.

amiano63it@damiano63it-SATELLITE-PRO-C850-1HD:~$ rm -rf /nix ~/.nix-channels ~/.nix-defexpr ~/.nix-profile
damiano63it@damiano63it-SATELLITE-PRO-C850-1HD:~$ sudo systemctl stop nix-daemon.service
sudo systemctl disable nix-daemon.socket nix-daemon.service
sudo systemctl daemon-reload
[sudo] password di damiano63it:
Failed to stop nix-daemon.service: Unit nix-daemon.service not loaded.
Failed to disable unit: Unit file nix-daemon.socket does not exist.
damiano63it@damiano63it-SATELLITE-PRO-C850-1HD:~$ sudo rm -rf /etc/nix /etc/profile.d/nix.sh /etc/tmpfiles.d/nix-daemon.conf /nix ~root/.nix-channels ~root/.nix-defexpr ~root/.nix-profile
damiano63it@damiano63it-SATELLITE-PRO-C850-1HD:~$ for i in $(seq 1 32); do
sudo userdel nixbld$i
done
sudo groupdel nixbld
userdel: l’utente ‘nixbld1’ non esiste
userdel: l’utente ‘nixbld2’ non esiste
userdel: l’utente ‘nixbld3’ non esiste
userdel: l’utente ‘nixbld4’ non esiste
userdel: l’utente ‘nixbld5’ non esiste
userdel: l’utente ‘nixbld6’ non esiste
userdel: l’utente ‘nixbld7’ non esiste
userdel: l’utente ‘nixbld8’ non esiste
userdel: l’utente ‘nixbld9’ non esiste
userdel: l’utente ‘nixbld10’ non esiste
userdel: l’utente ‘nixbld11’ non esiste
userdel: l’utente ‘nixbld12’ non esiste
userdel: l’utente ‘nixbld13’ non esiste
userdel: l’utente ‘nixbld14’ non esiste
userdel: l’utente ‘nixbld15’ non esiste
userdel: l’utente ‘nixbld16’ non esiste
userdel: l’utente ‘nixbld17’ non esiste
userdel: l’utente ‘nixbld18’ non esiste
userdel: l’utente ‘nixbld19’ non esiste
userdel: l’utente ‘nixbld20’ non esiste
userdel: l’utente ‘nixbld21’ non esiste
userdel: l’utente ‘nixbld22’ non esiste
userdel: l’utente ‘nixbld23’ non esiste
userdel: l’utente ‘nixbld24’ non esiste
userdel: l’utente ‘nixbld25’ non esiste
userdel: l’utente ‘nixbld26’ non esiste
userdel: l’utente ‘nixbld27’ non esiste
userdel: l’utente ‘nixbld28’ non esiste
userdel: l’utente ‘nixbld29’ non esiste
userdel: l’utente ‘nixbld30’ non esiste
userdel: l’utente ‘nixbld31’ non esiste
userdel: l’utente ‘nixbld32’ non esiste
groupdel: il gruppo ‘nixbld’ non esiste
damiano63it@damiano63it-SATELLITE-PRO-C850-1HD:~$

The problem is just that: it is not possible to uninstall the NixOS bootloader!!! I am forced to use an external boatloder on pendrive

This is how all OSes work.

That being said, it is easy to fix that.

Can you share the output of sudo efibootmgr

damiano63it@damiano63it-SATELLITE-PRO-C850-1HD:~$ sudo efibootmgr
BootCurrent: 0006
Timeout: 0 seconds
BootOrder: 2001,0009,0007,0005,0008,0000,0001,0004,2003,2002
Boot0000* Windows Boot Manager
Boot0001* ubuntu
Boot0002* EFI Network 0 for IPv6 (7C-05-07-0A-80-BE)
Boot0003* EFI Network 0 for IPv4 (7C-05-07-0A-80-BE)
Boot0004* Ubuntu
Boot0005* rEFInd Boot Manager
Boot0006* EFI USB Device (General)
Boot0007* debian
Boot0008* Grub2Win EFI - 64 Bit
Boot0009* Linux Boot Manager
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network

It looks like the default is:

That is probably NixOS if you are using systemd-boot.

You have a lot of other entries. I would guess that either 0001 or 0004 is your Mint install.

Try setting one of those as the default. You can do this in efibootmgr or just make the change in your BIOS

In the meantime, thank you for your responses.
Just 3 comments:

  1. “You have a lot of other entries. I would guess that either 0001 or 0004 is your Mint install.”

Yes, that is so

  1. “Try setting one of those as the default. You can do this in efibootmgr …”

How should I do it, in what way?

  1. “… or just make the change in your BIOS”

Actually, I can’t change the BIOS: now I am responding from another laptop of mine, which is newer and has nothing but linux mint, Linux debian and manjaro LInux.
The laptop with NixOS installed is an old toshiba that doesn’t allow any loading of a new BIOS and which I use for work (It also has windows 10 pro and my clients use only Microsoft)

You could try just deleting the entries you don’t need. For example:
sudo efibootmgr -Bb 0009

If you need to change the order you can do it like this:
sudo efibootmgr --bootorder <the order you want>

You don’t need to update or replace the BIOS itself. I mean that the BIOS should have a setting in it for UEFI boot order you can change. You can do this instead of using the efibootmgr command if you prefer.

1 Like

“You don’t need to update or replace the BIOS itself. I mean that the BIOS should have a setting in it for UEFI boot order you can change…”

Sorry but, maybe it’s because I’m 60 years old, I use particularly old laptops.
do you know what a TOSHIBA SATELLITE PRO C850-1HD is? :smile:
BIOS is not possible to change or upgrade.

You don’t need to change the BIOS to enter the BIOS menu, like this: toshiba satellite boot menu | toshiba laptop boot menu key | how to enter toshiba laptop bios - Invidious