I keep filling up /boot
with old kernels, at which point nixos-rebuild switch --upgrade
will download a bunch of derivations only to eventually fail when installing the new kernel (or initrd) because there is insufficient space on /boot
.
One option is to run nix-collect-garbage -d
, but that can be extremely slow and can result in needing to download the newly downloaded versions all over again.
Sometimes deleting old kernels seems to help (until /boot
fills up again), whereas other times, manually picking a few generations to delete from ls /nix/var/nix/profiles/system-??-link
has worked better.
Is there a better approach to deal with /boot
filling up? (Particularly for when I want to upgrade and use the new system right away.)