From 775c6bd14bd268ee49fb9eb6ec5c5312a75705cd Mon Sep 17 00:00:00 2001 From: James Swineson Date: Fri, 21 Jun 2019 09:59:49 +0800 Subject: [PATCH] disable APT package cache to save some space --- menhera.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/menhera.sh b/menhera.sh index 52d7ad5..4e46a32 100755 --- a/menhera.sh +++ b/menhera.sh @@ -106,6 +106,10 @@ mount_new_rootfs() { install_software() { echo "Installing OpenSSH Server into new rootfs..." + + # disable APT cache + echo -e 'Dir::Cache "";\nDir::Cache::archives "";' > "${NEWROOT}/etc/apt/apt.conf.d/00_disable-cache-directories" + DEBIAN_FRONTEND=noninteractive chroot "${NEWROOT}" apt-get update -y DEBIAN_FRONTEND=noninteractive chroot "${NEWROOT}" apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y ssh }