Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have 2 systems running Debian at home and I am trying to minimize the bandwidth use while upgrading the packages. How can I increase the size limit of the cache, so that I could just copy the packages over LAN? (currently they get removed too quickly)

share|improve this question
What is the output of apt-config dump | grep -i clean? – enzotib Oct 4 '11 at 16:42
Hi @enzotib, I get nothing: grzes:/home/ga# apt-config dump | grep -i clean? grzes:/home/ga# – Grzenio Oct 5 '11 at 6:57
The question mark was not part of the command :) – enzotib Oct 5 '11 at 6:59
Heh :) Without the question mark I get the following: APT::Periodic::AutocleanInterval "0"; – Grzenio Oct 6 '11 at 9:16

2 Answers

up vote 1 down vote accepted

To set the cache size for apt, you need to edit apt.conf. You can get information on how to configure it in man apt.conf. If it is not already present create it in /etc/apt/apt.conf or you may need to edit /etc/apt/apt.conf.d/70debconf file, please refer specific version's documentation.

Debian provides Cache-Limit option in APT Group in apt.conf. You can experiment with it.

man apt.conf says,

Cache-Limit
              APT  uses  a  fixed  size  memory mapped cache file to store the
              'available' information. This sets the size of that cache. 

So you need to put following line in apt.conf.

APT::Cache-Limit "cache_size" Put appropriate cache size in place.

share|improve this answer

You should consider using a separate caching proxy for your apt instances. apt-proxy is one tool you could try. Let that do the caching and prune the individual apt archives more aggressively.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.