diff options
Diffstat (limited to 'chcleanup')
-rwxr-xr-x | chcleanup | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,7 +1,11 @@ #!/bin/bash -[ ! -f ~/cleansystem ] && exit 1 +[ ! -f /etc/libretools.d/cleansystem ] && exit 1 -sudo pacman --noconfirm -Rcs $(comm -23 <(pacman -Qq | sort) <(sort ~/cleansystem)) +packages=($(comm -23 <(pacman -Qq | sort) <(sort /etc/libretools.d/cleansystem))) + +echo "Removing: ${packages[@]}" + +sudo pacman --noconfirm -Rcs ${packages[@]} exit $? |