From 10fc439940f5f2e8ab5053d1587b8bd256944492 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Tue, 15 May 2018 03:51:28 +0200 Subject: Reduce image bloat. 1. Do not install "recommended" packages 2. Do not keep apt indices in the binary image 3. Clean up firmware packages that are installed by metapackages but are not required for for network or storage hardware. 4. Revert vim to vim-tiny --- data/live-build-config/hooks/22-cleanup-packages.chroot | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 data/live-build-config/hooks/22-cleanup-packages.chroot (limited to 'data/live-build-config/hooks/22-cleanup-packages.chroot') diff --git a/data/live-build-config/hooks/22-cleanup-packages.chroot b/data/live-build-config/hooks/22-cleanup-packages.chroot new file mode 100755 index 00000000..db1a6bfb --- /dev/null +++ b/data/live-build-config/hooks/22-cleanup-packages.chroot @@ -0,0 +1,14 @@ +#!/bin/sh + +# Clean up packages that were installed for dependencies but are no longer needed +# and packages installed by metapackages that we'll never need + +UNWANTED_PKGS="dahdi-firmware-nonfree \ + firmware-crystalhd firmware-ivtv \ + firmware-samsung" + +for p in $UNWANTED_PKGS; do + apt-get -y remove $p +done + +apt-get -y autoremove -- cgit v1.2.3