[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#586428: Please clear the apt cache

[Martin Michlmayr]
> Is there a reason why base-installer doesn't clear the apt cache
> after installing base?  I end up with about 70 MB of .debs in
> /var/cache/apt/archives and this hurts on machines with little space
> (such as machines with only 512 MB flash storage).

When Debian Edu set up its thin client server, the installer reuse the
APT cache by bind-mounting /var/cache/apt/archives into the chroot to
avoid having to download the same packages again when creating the
LTSP chroot.  Because of this, I would suggest to not clear the cache
by default until at the very end of the installation run.

What about making the apt cache cleaning optional and default to not
doing it, and allow the systems with little disk space to remove it?

>  cleanup () {
> +	rm -f /target/var/cache/apt/archives/*.deb 2>/dev/null || true
>  	rm -f "$KERNEL_LIST" "$KERNEL_LIST.unfiltered"
>  }

Is it not better to use 'apt-get clean' or similar?

Happy hacking,
Petter Reinholdtsen

Reply to: