dotfiles/bin/clean.sh

26 lines
366 B
Bash
Raw Normal View History

#!/bin/sh
2017-05-03 23:12:13 +02:00
case "$1" in
all)
$0 docker
2020-12-16 18:08:29 +01:00
$0 nix
2017-05-03 23:12:13 +02:00
$0 pacman
2019-05-03 23:01:59 +02:00
$0 yay
2017-05-03 23:12:13 +02:00
;;
docker)
docker system prune --force 2>/dev/null
2017-05-03 23:12:13 +02:00
;;
2022-02-21 18:40:30 +01:00
nix)
nix-collect-garbage --delete-old 2>/dev/null
2020-12-16 18:08:29 +01:00
;;
2017-05-03 23:12:13 +02:00
pacman)
pacman -Sc --noconfirm 2>/dev/null
2017-05-03 23:12:13 +02:00
;;
2019-05-03 23:01:59 +02:00
yay)
2022-02-21 18:40:30 +01:00
yay -Sacc --noconfirm 2>/dev/null
;;
2017-05-03 23:12:13 +02:00
*)
2020-12-16 18:08:29 +01:00
echo "Please give parameter of: [all docker nix pacman yay]"
2017-05-03 23:12:13 +02:00
;;
esac