summaryrefslogtreecommitdiff
path: root/hooks/minimal
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/minimal')
-rwxr-xr-xhooks/minimal12
1 files changed, 9 insertions, 3 deletions
diff --git a/hooks/minimal b/hooks/minimal
index c5bb412..37e1f75 100755
--- a/hooks/minimal
+++ b/hooks/minimal
@@ -10,9 +10,15 @@
set -e
# Removing unused packages
-apt-get remove --purge --yes apt-utils aptitude
-apt-get remove --purge --yes man-db manpages info
-apt-get remove --purge --yes ssl wget
+for PACKAGE in apt-utils aptitude man-db manpages info ssl wget
+do
+ if ! apt-get remove --purge --yes "${PACKAGE}"
+ then
+ echo "WARNING: ${PACKAGE} isn't installed"
+ fi
+done
+
+apt-get autoremove || true
# Removing unused files
find . -name *~ | xargs rm -f