|
|
|
@ -39,10 +39,10 @@ if [ -z "${DIRECTORY}/data/installed-packages/${PRG}" ];then
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
PURGE_LIST="$(sudo apt-get purge --dry-run $PKG_LIST | sed -n '/The following packages/,/to remove/p' | sed -e '2,$!d' -e '$d' | tr -d '*' | tr '\n' ' ')"
|
|
|
|
|
PURGE_LIST="$(sudo apt-get purge --dry-run $PKG_LIST | sed -n '/The following packages will be REMOVED/,/to remove and/p' | sed -e '2,$!d' -e '$d' | tr -d '*' | tr '\n' ' ')"
|
|
|
|
|
echo "These packages will be purged: $PURGE_LIST"
|
|
|
|
|
|
|
|
|
|
output="$(sudo apt purge -y $PURGE_LIST 2>&1)"
|
|
|
|
|
output="$(sudo apt purge -y $PKG_LIST 2>&1)"
|
|
|
|
|
exitcode=$?
|
|
|
|
|
errors="$(echo "$output" | grep '^[(W)|(E)|(Err]:')"
|
|
|
|
|
sudo apt autoremove -y && sudo apt clean && sudo apt-get purge -y $(dpkg -l | grep '^rc' | awk '{print $2}')
|
|
|
|
|