purge-installed run faster

pull/559/head
Botspot 4 years ago
parent 085b04d205
commit f2552d9147

@ -40,9 +40,6 @@ if [ -z "${DIRECTORY}/data/installed-packages/${PRG}" ];then
exit 0
fi
#remove residual packages
sudo apt autoremove -y && sudo apt clean && sudo apt-get purge -y $(dpkg -l | grep '^rc' | awk '{print $2}')
PURGE_LIST="$(sudo LANG=C 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' ' ' | sed 's/The following.*//')"
echo "These packages will be purged: $PURGE_LIST"

Loading…
Cancel
Save