# remove old and unused libraries
remove_orphaned () {
- local package
+ local package remove
apt_autoremove
+ remove=
for package in $orphaned_packages; do
if is_orphaned $package; then
- pkgrm $package
+ remove="$remove $package"
fi
done
+
+ if [ "$remove" ]; then
+ pkgrm $remove
+ fi
}
# monit it causing problems for postinst scripts