I am using ubuntu 12.04 LTS. I want to save downloaded packages using aptoncd, so that I don't need to download all the packages again when I reinstall OS.

Now, the problem is last week when I checked my /var/cache/apt/archives folder, there were more than thoousand packages about 1 GB in Total. Yesterday, when I again checked the archives folder, it had only 451 packages left about 500 MB in total.

So, can anyone tell me how the packages in the Archives folder get deleted ?? 'cause I didn't delete any of them. Now, I can't take backup of those packages, 'cause I don't know which packages are missing.


Take a look at /etc/apt/apt.conf.d/20archive.

In there there are a few lines used by the daily apt cron job:

APT::Archives::MaxAge "30";  
APT::Archives::MinAge "2";
APT::Archives::MaxSize "500";

Those are the defaults. If you set all of them to zero, then your apt cache files should not be deleted.

Why does /var/cache/apt/archives keep deleting files?

  • Yes!, It is same as u said, I am gonna change it, Thanks For help. Lets see waht Happens – Incredible Dec 16 '12 at 4:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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