From 46e8d71a8beea22ba3e1766cb82d7224aa09d238 Mon Sep 17 00:00:00 2001 From: nodiscc Date: Sun, 23 Feb 2020 13:49:38 +0100 Subject: [PATCH] add a live-build hook to clear apt cacahe of downloaded pakages form final image cleanup is still incomplete https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=947123 --- config/hooks/normal/0900-clear-apt-cache.hook.chroot | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 config/hooks/normal/0900-clear-apt-cache.hook.chroot diff --git a/config/hooks/normal/0900-clear-apt-cache.hook.chroot b/config/hooks/normal/0900-clear-apt-cache.hook.chroot new file mode 100755 index 0000000..449b6c0 --- /dev/null +++ b/config/hooks/normal/0900-clear-apt-cache.hook.chroot @@ -0,0 +1,6 @@ +#!/bin/sh +# clear APT package download cache to reduce the image size from ~100MB +rm -vr /var/lib/apt/lists/ + +# clear APT package list cache to reduce the image size from ~180MB +rm -vr /var/cache/apt/ \ No newline at end of file