purge-installed: combine apt commands with --autoremove flag

pull/906/head
Botspot 4 years ago
parent c25296eee2
commit 494fef8661

@ -33,10 +33,7 @@ if dpkg -l pi-apps-$appnamehash &>/dev/null ;then
apt_lock_wait
echo -e "\e[97m\nRemoving dummy deb for $app...\e[39m"
sudo apt purge -y pi-apps-$appnamehash || error "apt failed to purge dummy deb (pi-apps-$appnamehash)!"
echo -e "\e[97m\nAutoremoving packages...\e[39m"
sudo apt autoremove -y || error "apt failed to autoremove!"
sudo apt purge -y pi-apps-$appnamehash --autoremove || error "apt failed to purge dummy deb (pi-apps-$appnamehash)!"
elif [ -f "${DIRECTORY}/data/installed-packages/${app}" ];then
#old pkg-install implementation

Loading…
Cancel
Save