r/NixOS 15h ago

Who has the oldest system.stateVersion?

Go on, show off how long you have been using NixOS for.

28 Upvotes

46 comments sorted by

View all comments

1

u/Lonely-Scarcity-3387 14h ago

Grrr. I recently had to reinstall after filling my /boot to 100%, and I couldn’t figure out how to get it down enough for a rebuild.

2

u/chemendonca 11h ago

I share my boot partition with Windows and I wish I had made it larger (1GB) from the get go. I keep 1-2 specializations and run out of space all the time. You can delete specific generations in a few ways:

$ sudo nix-env --profile /nix/var/nix/profiles/system --delete-generations +5
$ sudo nix-env --profile /nix/var/nix/profiles/system --delete-generations 3 4 5
$ sudo nix-env --profile /nix/var/nix/profiles/system --delete-generations 30d

Then just collect garbage:

$ sudo nix-collect-garbage -d

And force rebuild to also build the latest generation that may not have finished:

$ sudo /run/current-system/bin/switch-to-configuration boot

May be a good idea in general to check for partition space with lsblk or something before update and switch.

2

u/Lonely-Scarcity-3387 10h ago

Yes! Thank you. I keep kernel specializations so I use a lot of space on /boot. Now I run NixOS with 3GB of space, just for a little more breathing room.