Replies: 1 comment
-
|
Right now, I'm running: nix-env -p /nix/var/nix/profiles/system --list-generations \
| awk '{print $1, $2}' \
| sort -k2,2 -k1,1rn \
| awk 'seen[$2]++ {print $1}' \
| xargs -r nix-env -p /nix/var/nix/profiles/system --delete-generationsbefore |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I use
nixos-rebuild switchmultiple times a day instead of usingnixos-rebuild testso I end up with multiple generations per day.So for me, it would be nice to be able to only keep 1 generation (the latest) per day. Normally, the last one of the day is the one I'm happy with (unless I'm tweaking stuff before and after midnight).
Beta Was this translation helpful? Give feedback.
All reactions