Bug#1139562: apt: Fails to determine required space
David Kalnischkies <[email protected]> Wed, 10 Jun 2026 10:25:02 +0200
| Newsgroups | gmane.linux.debian.apt.devel |
|---|---|
| Message-ID | <aih2c58yxb1pI_f2__8665.16598486982$1781080652$gmane$org@crossbow> |
--tb7lmzs6pay2vd7h Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: Bug#1139562: apt: Fails to determine required space MIME-Version: 1.0 Am Tue, Jun 09, 2026 at 06:46:13PM +0000, schrieb Helge Kreutzmann: > Space needed: 8196 kB / 580 MB available [=E2=80=A6] > Unpacking texlive-fonts-extra (2026.20260527-1) over (2026.20260328-5) ... > dpkg: error processing archive /var/cache/apt/archives/texlive-fonts-extr= a_2026.20260527-1_all.deb (--unpack): > cannot copy extracted data for './usr/share/texlive/texmf-dist/tex/latex= /newtx/newtx.sty' to '/usr/share/texlive/texmf-dist/tex/latex/newtx/newtx.s= ty.dpkg-new': failed to write (No space left on device) > Errors were encountered while processing: > /var/cache/apt/archives/texlive-fonts-extra_2026.20260527-1_all.deb [=E2=80=A6] > As you can see, apt claims, that 8196 kB is needed, however, the package = seems to need much more: (No space left on device) >=20 > So somehow the calcuation done by apt is broken. The calculation apt does is based on the Installed-Size comparing what the old versions used vs. what the new versions use. The size increase after the installation is complete might be (at least) 8 MB in this case. This does not include auto-generated files, those downloaded while configuring (non-free packages), =E2=80=A6 as those files are not included in the package and are hence not part of the value of Installed-Size (that is generated by dpkg at package build time). The problem here is, I think, something else through: texlive-fonts-extra has an Installed-Size of 1.892 MB. If dpkg installs the upgrade by placing the .dpkg-new files alongside the old files before replacing them all the installation process might need 2 GB of free space temporarily which you don't have. (I don't know the inner workings of dpkg enough to know how it behaves, but I suspect it does so for handling reverts/aborts) Maybe we can look for the biggest (upgraded) deb to install and warn if the system hasn't enough free space to unpack it entirely. This would be off in edge cases of multi-partitioned systems, but those folks have problems with the 'Space needed' info anyhow as we don't know where the data will end up (/boot, /usr, /opt, =E2=80=A6). While at it, we might want to check that the upgrades fit before any reductions apply (be it upgrades or removals) as we don't really know in which order they will apply (well, we kinda do, but that might be overkill to calculate). Especially the removals are done last, which if we take texlive-fonts-extra as an example makes a big difference on this example system. Best regards David Kalnischkies --tb7lmzs6pay2vd7h Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE5sn+Q4uCja/tn0GrMRvlz3HQeIMFAmopH1kACgkQMRvlz3HQ eIMHEQ/8C8XG1lv/cviqNCbnmssj53vmuDyCo3p/4xQ+kCk4jIMXhF5TK1EOBcbo /aVkvtiB5Qy2lYq/1m3feauD/e7ilWmaoOi4KWXzcfB0jzDHAwKb2gwp6lHHdpwI qy8JzX5xlyrhYzFomHA2Om3ZYWHgLAtuF/YaS1m492CYD4SJNU7JhcCTpmLY1+9t Be5uCi6FHnvjqJ/26yxc/6jfOjrj86Rwuoz5LYgw3S+YG7+XboOZ7vVkLpuXTNnf 0UcyS76ErLW+moc2ZCIWVn1bzkbFbpa2mb5a07uzMxMztcqcTFW5bKA4JFfVPJAQ TdIfQA2NJZRPLcV993lBKEupbkGr1tpvfswytKSN5x8o8LHF5QhpvT6zBlcuS/ax wlals3qgEVedOXrLxwWn6p5D0kCGzogoUdwEUWV6aIqnL31mPLm+O551682ca+Rs RqhrQw7IKADB5u1gn4CO9KFbfikD8bX+k6XZSVfplvKdJ0pncCMwN2fpxFnSO8dl U3tMSJ7HtAuSFO8h2oaDo5LAXW7unOKhXkao1ZBGebBxhunwEN5RNPi5PsI/qXtD fosnmkVoCAQvF2HVF78aZz5Ek6agWCr5d2GdmvrfhMALlaoTTQJ4sdNAjDIPync1 URiIXqAymwRvjWWeQvQjzPWS48K9M8/hBDljTzehKRl6svkwspw= =OfKp -----END PGP SIGNATURE----- --tb7lmzs6pay2vd7h--