Bug#430377: marked as done (Apt uses unbounded space in /var/cache/apt/archives/)
Your message dated Tue, 25 Feb 2025 17:34:31 +0100
with message-id <20250225173347.GA3409990@debian.org>
and subject line Re: Bug#430377: Apt uses unbounded space in /var/cache/apt/archives/
has caused the Debian Bug report #430377,
regarding Apt uses unbounded space in /var/cache/apt/archives/
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)
--
430377: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=430377
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: Apt uses unbounded space in /var/cache/apt/archives/
- From: Ron <iampure@gmail.com>
- Date: Sun, 24 Jun 2007 00:48:04 +0200
- Message-id: <20070623224804.23566.23967.reportbug@justok.thuisnetwerk.nl>
Package: apt
Version: 0.6.46.4-0.1
Severity: wishlist
Currently merely running apt-get update;apt-get update can break for example the mail system, because /var/cache/apt/archives/ keeps growing and growing until a user does apt-get clean.
Specific solution addressing problem:
There should be an option in a configuration file with a default value of 3GB s.t. the administrator can put a maximum limit on the size of /var/cache/apt/archives/. In case downloading new packages will otherwise go over this bound as set in the configuration file via a Least Recently Used mechanism packages are deleted from the cache and then the upgrading can proceed.
-- Package-specific info:
-- (/etc/apt/preferences present, but not submitted) --
-- (/etc/apt/sources.list present, but not submitted) --
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.18-4-k7 (SMP w/1 CPU core)
Locale: LANG=nl_NL.UTF-8, LC_CTYPE=nl_NL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages apt depends on:
ii debian-archive-keyring 2007.02.19-0.1 GnuPG archive keys of the Debian a
ii libc6 2.5-11 GNU C Library: Shared libraries
ii libgcc1 1:4.2-20070609-1 GCC support library
ii libstdc++6 4.2-20070609-1 The GNU Standard C++ Library v3
apt recommends no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
On Sat, Feb 22, 2025 at 08:40:11PM +0100, Kamil Ignacak wrote:
> Hi,
>
> On one hand there is
> apt/apt-private/private-download.cc/CheckFreeSpaceBeforeDownload() function
> that checks only if target location has enough space for downloaded files.
>
> One of calls of this function is made for "Dir::Cache::Archives" location. I
> assume that this call is relevant to this ticket, and that the function
> confirms if there is enough free space in /var/cache/apt/archives/ for
> downloaded packages.
>
> Actually the function checks if a mounted file system in which given path
> exists has enough free space, but this is an irrelevant detail.
>
> The function doesn't check any file system usage limits hardcoded in code or
> specified by configuration. It just compares "need to download" size with
> "space available on file system" size.
>
> I have checked this in one of most recent commits to apt's git, but the
> function was added in https://salsa.debian.org/apt-team/apt/-/commit/9c81f8de38df940559d13a3ea9591d63cbe970bb,
> replacing an already existing similar code.
>
>
>
> On the other hand there is a /usr/lib/apt/apt.systemd.daily script and a
> /usr/lib/systemd/system/apt-daily.service systemd service.
>
> Part of the script can remove packages from /var/cache/apt/archives/ when
> the script is invoked in a specific way, and when certain conditions are
> met. The conditions include the following parameters that are described on
> top of the script:
> APT::Periodic::MaxAge
> APT::Periodic::MinAge
> APT::Periodic::MaxSize
>
> It looks like the service and the script may overlap with reporter's
> expectations, but I can't tell to what degree.
>
> I have checked this on a system with apt 2.6.1.
>
> Kamil
Closing this accordingly.
--
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer i speak de, en
--- End Message ---
Reply to: