aboutsummaryrefslogtreecommitdiff
path: root/scripts/gc.sh
blob: 84717fb2d01e580a1d1478294bbf3ca30c7d8847 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
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/*