How to remove broken, *newer* boot entry?

I’ve run nixos-rebuild switch --upgrade, and that broke Vivaldi for me (some pages just die for whatever reason). So I rebooted into the previous config, pre-upgrade, and run /run/current-system/bin/switch-to-configuration boot to make it current.

Now when I boot, the previous configuration is selected as a default. However, the newer, broken configuration is still there, and gives me aesthetics pain :slight_smile: How do I remove it from boot menu?

2 Likes

Figured that out!

λ ls /nix/var/nix/profiles/
drwxr-xr-x  - root 23 Dec  2020  per-user
lrwxrwxrwx 15 root 14 Oct 11:41  system -> system-105-link # Note: points to a *previous* generation.
lrwxrwxrwx 88 root  1 Oct 12:38  system-105-link -> /nix/store/cdlxkpcrz9pyrb9sjkwgjmrj06ai7zvp-nixos-system-moby-21.11pre319562.c21ba4f7bb4
lrwxrwxrwx 88 root 14 Oct 11:36  system-106-link -> /nix/store/73cny4fm4jfnqdzfm1vkz7xrj2rq4m2v-nixos-system-moby-21.11pre322478.e4ef597edfd
λ exa -l /boot/loader/entries/
.rwxr-xr-x 433 root 14 Oct 11:41 nixos-generation-105.conf
.rwxr-xr-x 433 root 14 Oct 11:41 nixos-generation-106.conf
λ doas rm /nix/var/nix/profiles/system-106-link
λ doas rm /boot/loader/entries/nixos-generation-106.conf 
1 Like