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

Bug#783112: MaxAge files are not removed by order of size



Package: apt
Version: 0.8.16~exp12ubuntu10.21

Background: The top of /etc/cron.daily/apt states

#  APT::Archives::MaxSize "0"; (old, deprecated)
#  APT::Periodic::MaxSize "0"; (new)
#  - Set maximum size of the cache in MB (0=disable). If the cache
#    is bigger, cached package files are deleted until the size
#    requirement is met (the biggest packages will be deleted
#    first).

Problem: Reading the code further down it looks like cleanup loop for MaxSize is removing oldest-first, not biggest first:

       # reverse-sort by mtime
        for file in $(ls -rt $Cache/*.deb 2>/dev/null); do

So, it looks like the documentation is incorrect on this matter.

Let me know if I've misunderstood something.

Cheers,
Jens

Reply to: