diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/gc.sh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/scripts/gc.sh b/scripts/gc.sh index 84717fb..d08c008 100755 --- a/scripts/gc.sh +++ b/scripts/gc.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Cleaning up the NixOS store +## Cleaning up the NixOS store profiles=(per-user/root/channels per-user/andreh/profile per-user/andreh/channels system) @@ -8,6 +8,24 @@ for p in ${profiles[@]}; do sudo nix-env --delete-generations old -p /nix/var/nix/profiles/$p done +nix-env --delete-generations old + +nix-store --gc nix-collect-garbage -d + +## Cleanup up the Trash folder + rm -rf ~/.local/share/Trash/files/* + + +## Erasing docker images + +docker system prune -a +docker rmi $(docker images -a -q) +docker rm $(docker ps -a -f status=exited -q) + +docker stop $(docker ps -a -q) +docker rm $(docker ps -a -q) + +docker volume prune |