aboutsummaryrefslogtreecommitdiff
path: root/scripts/gc.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2018-05-12 22:22:56 -0300
committerEuAndreh <eu@euandre.org>2018-05-12 22:22:56 -0300
commita42f15918c3d4e76889f1fb1c5dfcd4b5989d7f3 (patch)
treef988189b0b20451db998871dcf64ac6976352242 /scripts/gc.sh
parentAdd repos to mrconfig (diff)
downloaddotfiles-a42f15918c3d4e76889f1fb1c5dfcd4b5989d7f3.tar.gz
dotfiles-a42f15918c3d4e76889f1fb1c5dfcd4b5989d7f3.tar.xz
Add scripts/gc.sh
Diffstat (limited to 'scripts/gc.sh')
-rwxr-xr-xscripts/gc.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/gc.sh b/scripts/gc.sh
new file mode 100755
index 0000000..84717fb
--- /dev/null
+++ b/scripts/gc.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+# Cleaning up the NixOS store
+
+profiles=(per-user/root/channels per-user/andreh/profile per-user/andreh/channels system)
+
+for p in ${profiles[@]}; do
+ sudo nix-env --delete-generations old -p /nix/var/nix/profiles/$p
+done
+
+nix-collect-garbage -d
+
+rm -rf ~/.local/share/Trash/files/*