[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#160743: apt: apt-get clean should run weekly



2015-12-30 18:25 GMT+02:00 Julian Andres Klode <jak@debian.org>:
> On Wed, Dec 30, 2015 at 05:27:40PM +0200, Martin-Éric Racine wrote:
>> Package: apt
>> Version: 1.0.9.8.1
>> Followup-For: Bug #160743
>>
>> What the reporter wants is essentially a key similar to APT::Periodic::AutocleanInterval that would perform 'clean' instead of merely 'autoclean' at N day intervals.
>>
>> I fully concur and hereby add my voice to this wishlist item.
>
> I just want to add that we planned to automatically remove any
> .deb files successfully installed after an apt install run, but
> have not gotten around to do that yet.

This could work too.

I would still make this configurable via an APT configuration key e.g.
APT::CleanCacheAlways "true/false" or APT::CleanCacheOnSuccess
"true/false" just to be safe.

Then again, it might be time to rethink the semantic of those separate
Clean and AutoClean keys completely and instead consolidate this into
a single APT key for configurating autoclean/clean/noclean as the
desired post-success action.

Thinking out loud, in a development chroot or on buildd host, merely
performing 'autoclean' makes perfect sense since we DO want to avoid
re-fetching packages that frequently need to be unpacked as build-dep.
However, on a deployment host, keeping any package or partial download
in /var/cache/apt/archives/ is a complete waste of disk space.

> Another idea would be to say that all packages older than
> N days will be removed in a cron job, if they are currently
> installed, and maybe after a month if they are not installed.

Hence my suggestion for an APT::Periodic::CleanInterval configuration
key.  Then again, see above. Consolidating autoclean/clean/noclean as
the periodic action to perform might make more sense than adding an
APT::Periodic::CleanInterval to the existing
APT::Periodic::AutocleanInterval key.

Martin-Éric


Reply to: