summaryrefslogtreecommitdiff
path: root/chcleanup
blob: 7074b84121f8c2782329085f426c71dcdeb8a42e (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

[ ! -f /etc/libretools.d/cleansystem ] && exit 1

packages=($(comm -23 <(pacman -Qq | sort) <(sort /etc/libretools.d/cleansystem)))

echo "Removing: ${packages[@]}"

sudo pacman --noconfirm -Rcs ${packages[@]}

exit $?