1

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.

1
  • run apt-get clean after every install or upgrade.
    – cas
    Jul 4, 2016 at 17:01

1 Answer 1

2

The 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .