diff options
Diffstat (limited to 'scripts/gc.sh')
-rwxr-xr-x | scripts/gc.sh | 13 |
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/* |