Comment 23 for bug 942180

Revision history for this message
Martin Pitt (pitti) wrote :

So this is well-known. defaults-builder could drop the cleanup of the apt lists, but that would severely increase the size of the images. I propose this could become an option, which would make the removal of /var/lib/apt/lists/* conditional in ubuntu-defaults-image:

# clean up files that we do not need
cat <<EOF > config/chroot_local-hooks/90_cleanup
#!/bin/sh
set -e
echo "$0: Removing unnecessary files..."
rm -vf /var/cache/apt/*cache.bin
rm -vf /var/lib/apt/lists/*_*
rm -vrf /tmp/*
EOF

The caches and /tmp/* etc. should still be cleaned.