Add informations on can-be-autoremoved packages

This commit is contained in:
Luc Didry 2016-05-04 11:52:15 +02:00
parent a281da1c3e
commit a75f916d56
1 changed files with 7 additions and 1 deletions

View File

@ -2,9 +2,15 @@
. /etc/update-motd.d/colors
n=$(apt-get -qq --just-print upgrade | cut -f 2 -d " " | sort -u | wc -l)
n=$(apt-get -qq --just-print dist-upgrade | cut -f 2 -d " " | sort -u | wc -l)
if [[ $n -gt 0 ]]; then
printf $LIGHT_RED
printf " You have %s packages waiting for upgrades." "$n"
printf $NONE"\n\n"
fi
n=$(apt-get -qq --just-print autoremove | cut -f 2 -d " " | sort -u | wc -l)
if [[ $n -gt 0 ]]; then
printf $YELLOW
printf " You have %s packages that were automatically installed and are not needed anymore." "$n"
printf $NONE"\n\n"
fi