aboutsummaryrefslogtreecommitdiffstats
path: root/ginaz
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ginaz/README9
1 files changed, 9 insertions, 0 deletions
diff --git a/ginaz/README b/ginaz/README
index 373522d..496d7f2 100644
--- a/ginaz/README
+++ b/ginaz/README
@@ -58,3 +58,12 @@ nixos-rebuild switch --upgrade
# later upgrades after flakes are enabled
cd /etc/nixos && nix flake update && cd && nixos-rebuild switch --upgrade && echo && nixos-rebuild list-generations | cat && echo && nix store diff-closures $(find /nix/var/nix/profiles -iname system-\* -type l | sort | tail -2 | xargs)
+
+# clean up all but the two most recent systems
+nixos-rebuild list-generations | cat
+rm $(ls /nix/var/nix/profiles/system-*-link -1dtr | head -n -2)
+nixos-rebuild list-generations | cat
+nix-store --gc
+
+# deduplicate the store
+nix store optimise