From ae86fac03e4471d2976300f7838467bb7a51e45f Mon Sep 17 00:00:00 2001 From: Fierelier Date: Mon, 12 Sep 2022 08:48:57 +0200 Subject: [PATCH] Clean packages more thoroughly --- modlists/base | 3 ++- mods/apt-clean/data/etc/apt/apt.conf.d/99clean | 7 +++++++ mods/live-installer/data/bin/login | 3 ++- mods/packages-apply/modscript | 1 + 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 mods/apt-clean/data/etc/apt/apt.conf.d/99clean diff --git a/modlists/base b/modlists/base index 5f79312..3784ae2 100644 --- a/modlists/base +++ b/modlists/base @@ -4,4 +4,5 @@ hostname sources user-config oobe -fast-dpkg \ No newline at end of file +fast-dpkg +apt-clean \ No newline at end of file diff --git a/mods/apt-clean/data/etc/apt/apt.conf.d/99clean b/mods/apt-clean/data/etc/apt/apt.conf.d/99clean new file mode 100644 index 0000000..ec05898 --- /dev/null +++ b/mods/apt-clean/data/etc/apt/apt.conf.d/99clean @@ -0,0 +1,7 @@ +# Remove downloaded .deb files after installation by apt-get +APT::Keep-Downloaded-Packages "false"; +APT::Clean-Installed "true"; + +# Remove downloaded .deb files after installation by apt +Binary::apt::APT::Keep-Downloaded-Packages "false"; +Binary::apt::APT::Clean-Installed "true"; diff --git a/mods/live-installer/data/bin/login b/mods/live-installer/data/bin/login index 655eedd..190fbc7 100755 --- a/mods/live-installer/data/bin/login +++ b/mods/live-installer/data/bin/login @@ -102,7 +102,8 @@ while true; do # Remove live-specific packages echo "Removing live-specific packages ..." wdvn-chroot "/media/install" apt -y remove live-boot live-boot-initramfs-tools - wdvn-chroot "/media/install" update-initramfs.orig.initramfs-tools -u + wdvn-chroot "/media/install" apt -y autoremove + wdvn-chroot "/media/install" update-initramfs -u rm "/media/install/bin/login" mv "/media/install/bin/login.oobe" "/media/install/bin/login" diff --git a/mods/packages-apply/modscript b/mods/packages-apply/modscript index 8842066..3e74207 100644 --- a/mods/packages-apply/modscript +++ b/mods/packages-apply/modscript @@ -11,6 +11,7 @@ fi echo "apt -y install $WDVN_PACKAGES_DL apt -y remove $WDVN_PACKAGES_REMOVE apt -y autoremove +apt -y clean " >>"$1/oobe/setupComplete/50-packages" chmod +x "$1/oobe/setupComplete/50-packages"