.deb files disappearing from apt archive

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
yellowfinch
Level 3
Level 3
Posts: 174
Joined: Tue Aug 30, 2016 1:58 pm

.deb files disappearing from apt archive

Post by yellowfinch »

In LM 17.3 and 18.3, on occasion, I would retrieve .deb files from /var/cache/apt/archives/.

Since updating to 19.3, that directory is always empty when I check it.

In Synaptic’s settings, “Temporary files” is set to “Leave downloaded packages in the cache”. Is this option broken? Is there anything else I should check?
User avatar
LanceM
Level 10
Level 10
Posts: 3273
Joined: Sun Jul 08, 2018 11:50 pm

Re: .deb files disappearing from apt archive

Post by LanceM »

I think the setting in Synaptic should be like the pic if you want to keep files. (but this is Mint 20, so not sure if 19.x is the same). It may get fairly large if you don't clean it, either manually or with

Code: Select all

sudo apt clean
Apt.jpg
To mark this issue solved, go to your original 1st post and click the edit pencil and add [Solved] at the beginning of the title and click Submit.
Mint accepts donations: https://linuxmint.com/donors.php
yellowfinch
Level 3
Level 3
Posts: 174
Joined: Tue Aug 30, 2016 1:58 pm

Re: .deb files disappearing from apt archive

Post by yellowfinch »

LanceM wrote:
Thu Oct 15, 2020 7:36 pm
I think the setting in Synaptic should be like the pic if you want to keep files. (but this is Mint 20, so not sure if 19.x is the same).
Yes, it is the same in 19.x.

The second one is set to “Keep history”. I’m pretty sure that this option concerns the log files (in /root/.synaptic/log/), not the packages in /var/cache/apt/archives/.

As I mentioned before, the first one is set to “Leave all downloaded packages in the cache”.
User avatar
karlchen
Level 21
Level 21
Posts: 13503
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: .deb files disappearing from apt archive

Post by karlchen »

Hello, yellowfinch.
Starting with Mint 19.x, Mint added the following file to /etc/apt/apt.conf.d: 90mintsystem.
Content:

Code: Select all

APT::Archives::MaxAge "7";
APT::Archives::MinAge "2";
APT::Archives::MaxSize "500";
This file makes an APT service delete .deb packages from /var/cache/apt/archives/ after 7 days or earlier, in case the directory holds more than 500 MB of .deb files.

Karl
Image
Linux Mint 19.3 64-bit Cinnamon, Total Commander 9.51 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)
Post Reply

Return to “Newbie Questions”