dotfiles/.bin/sysclean-rm
2023-10-21 14:13:07 +02:00

18 lines
326 B
Bash
Executable File

#!/bin/sh
LIST="$(doas sysclean -a)"
FILES="$(echo "$LIST" | grep -v ^@)"
USERS="$(echo "$LIST" | grep ^@user)"
GROUPS="$(echo "$LIST" | grep ^@group)"
if [ ! -z "$FILES" ]
then
echo "$FILES"
echo -n "Delete these? [y/N] "
read
case $REPLY in
[yY]) echo "$FILES" | xargs doas rm -rf; ;;
esac
fi