Package: live-build Version: 1:20190311 Debian 10 Buster Dear Maintainer,
I noticed that the /var/lib/apt/lists/ directory in the squashfs contains about 162MB of files after the build. This makes my ISO image slightly larger than the expected max size of 2GB (small USB drives, ISO hosting restrictions). My config/archives/debian.list.chroot: deb https://deb.debian.org/debian/ buster main contrib non-free deb http://security.debian.org/ buster/updates main contrib non-free deb https://deb.debian.org/debian/ buster-updates main contrib non-free deb https://deb.debian.org/debian/ buster-backports main contrib non-free In an attempt to decrease the size of the ISO image, I added this to config/hooks/normal/0900-clear-apt-cache.hook.chroot and made it executable: #!/bin/sh # clear APT package download cache to reduce the image size rm -vr /var/lib/apt/lists/ By reading build.log I can confirm that the hook does run during the process; and clears out the directory, however one of the following build steps must have put those files in place again, because they are still present in the squashfs/live system. I can see the following solutions: - Something is wrong with my hook (what?) and I should correct it - live-build should implement a built-in way to clear /var/lib/apt/lists before the squashfs is generated - live-build should implement a way to run custom hooks just before the squashfs is generated Workarounds very welcome, thanks in advance