I have installed apt-cacher, but am worried that when I install a package on the machine that is running apt-cacher, that it will cache twice. Once with apt-cacher, and once with apt.
How do I prevent this? Caching with apt-cacher should be enough.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityThe only way to do this is to run clean after installing the said packages. This is necessary due the way that apt and dpkg interact. Apt calls dpkg with the path of all the the packages and allows dpkg to do it's job, but for such thing to happen the deb packages should be in the disk, ie. cannot be on the fly. Adding a DPkg::Post-Invoke
option issuing the apt-get clean command can be enough.
One alternative can be modifying the Dir::Cache::archives
path to point towards a temporary storage that would be cleaned upon reboot, for example.
apt-get clean
after every install or upgrade.