aboutsummaryrefslogtreecommitdiffstats
path: root/ginaz
diff options
context:
space:
mode:
authorMark Nipper <nipsy@bitgnome.net>2024-03-30 21:34:08 -0700
committerMark Nipper <nipsy@bitgnome.net>2024-03-30 21:34:08 -0700
commit7d1e5d46de8930fae1ac9dfc0230e171df46058a (patch)
tree18ba0692d72cf6c8cbcbc614537bdec286db3038 /ginaz
parent54dee8fbd404724cecd926b00b47366d6364eba9 (diff)
downloadnix-7d1e5d46de8930fae1ac9dfc0230e171df46058a.tar
nix-7d1e5d46de8930fae1ac9dfc0230e171df46058a.tar.gz
nix-7d1e5d46de8930fae1ac9dfc0230e171df46058a.tar.bz2
nix-7d1e5d46de8930fae1ac9dfc0230e171df46058a.tar.lz
nix-7d1e5d46de8930fae1ac9dfc0230e171df46058a.tar.xz
nix-7d1e5d46de8930fae1ac9dfc0230e171df46058a.tar.zst
nix-7d1e5d46de8930fae1ac9dfc0230e171df46058a.zip
Add some store management commands
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