Bug#1139562: apt: Fails to determine required space

Helge Kreutzmann <[email protected]> Thu, 11 Jun 2026 15:05:31 +0000
Newsgroups gmane.linux.debian.apt.devel
Message-ID <airOuyOBrm3LhOSx__76.2293044076046$1781190447$gmane$org@meinfjell.helgefjelltest.de>
This is a MIME-formatted message.  If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_meinfjell-1700490-1781190331-0001-2
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello David,
thanks for the analysis.

Am Wed, Jun 10, 2026 at 10:25:02AM +0200 schrieb David Kalnischkies:
> 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) =
=2E..
> > dpkg: error processing archive /var/cache/apt/archives/texlive-fonts-ex=
tra_2026.20260527-1_all.deb (--unpack):
> >  cannot copy extracted data for './usr/share/texlive/texmf-dist/tex/lat=
ex/newtx/newtx.sty' to '/usr/share/texlive/texmf-dist/tex/latex/newtx/newtx=
=2Esty.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 packag=
e seems to need much more: (No space left on device)
> >=20
> > So somehow the calcuation done by apt is broken.
>=20
> 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.
>=20
> 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).
>=20
>=20
> 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)

This sounds likely to me. And these tex packages are *huge*, indeed.
So on constrained systems (and this includes virtual machines) this
might make the difference.

> 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).

Well, looking at /usr probably should suffice, /boot might be a
problem for kernsl, /opt I don't know (is it used in ordinary debs?).

(And I'm one of those edge cases, indeed).

> 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.

As I understand you, the problem is understood now, so I will look to
get it working, probably, by removing some texlive debs and installing
them again (with the current version).

In case you need any further logs, please let me know.

Greetings

           Helge
--=20
      Dr. Helge Kreutzmann                     [email protected]
           Dipl.-Phys.                   http://www.helgefjell.de/debian.php
        64bit GNU powered                     gpg signed mail preferred
           Help keep free software "libre": http://www.ffii.de/

--=_meinfjell-1700490-1781190331-0001-2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEbZZfteMW0gNUynuwQbqlJmgq5nAFAmoqzrsACgkQQbqlJmgq
5nB2RxAApGY6wEA9YPoDzxVnGRL4RsrYNHtXwQMPk6VZLdVf4AQa2/NJi44DejRc
hRsZv1e/of/Ts0UiCwe+FYfyBGNgY3SricX1hWyD52EbAgP8dF5K+7Q2DlbUUBVX
EuqkpHZF/GNRrmOE5GyLnwpxtfRmg1hs0+6ekUgHvVEIrX+lN0MVQJljtvS5fGLN
X6XDOqqV8kWX/1CvWw41k5j8KIPG0ptEGYXu0Sh81pHan5ZWD0bYcNrMdh716S2O
VDCjqi2UNVHM3T/fE7TM7O1an9Iup4OvUrya06rqhBjEWsVmpXTqSvpSwH+OiAqa
8ofPwK96lOsRClbBU+qctCJ3YN5y4BsrCauobwmtbiUaylqSmXxM1NDbjFJ5jaVv
+q4DBR599Ye1vL9B91WmPVXmluWuCZAbmt5G7Q4B35PzR1i8Ni4wiHUsbREH3mN4
N6QpmrouuDHbBuAgygB6D3Mb+mJD00Q32zsx00oBE6i90JqxXg4FoDRm1lF6cxXO
4VhKhbgO5aLPrD/z32BmosXWPyiJhNnYrK4L00W6qORY9OUiROEAVbRYGJGDH0yO
Nt28eY3ZdFTeOKtE5xWyRxE3LWPii8qg8as8ArS5z7rYNu9NyqpsH1FhdWElx2fv
sk8wEXYR3eDKuMgThhEBe2Sby50VuEO6QoJ9GyKUm4cJqOxIkDY=
=L5FB
-----END PGP SIGNATURE-----

--=_meinfjell-1700490-1781190331-0001-2--