#1139562 apt: Fails to determine required space

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Helge Kreutzmann
Date:
2026-06-11 15:07:01 UTC
Severity:
normal
#1139562#5
Date:
2026-06-09 18:46:13 UTC
From:
To:
I just ran "apt dist-upgrade" as usual in testing. Howver, it failed,
running it again, yields:

root@twentytwo:~# LC_ALL=C apt dist-upgrade
The following package was automatically installed and is no longer required:
  libsnmp40t64
Use 'apt autoremove' to remove it.

Upgrading:
  texlive-fonts-extra

Not upgrading:
  cups-filters               libkpim6itinerary6        libqt5qmlmodels5         libqt5waylandclient5      libreoffice-calc                librust-blobby-dev          pdfgrep                            qml-module-qtquick2
  cups-filters-core-drivers  libpoppler-glib8t64       libqt5qmlworkerscript5   libqt5waylandcompositor5  libreoffice-core                librust-block-buffer-dev    poppler-utils                      qml-module-qtwebengine
  graphviz                   libpoppler-qt5-1t64       libqt5quick5             libqt5webchannel5         libreoffice-draw                librust-crypto-common-dev   python3-pyqt5                      qt5-gtk-platformtheme
  inkscape                   libpoppler-qt6-3t64       libqt5quickcontrols2-5   libqt5webengine-data      libreoffice-impress             librust-digest-dev          python3-uno                        qt5-image-formats-plugins
  kwayland-integration       libqt5core5t64            libqt5quicktemplates2-5  libqt5webengine5          libreoffice-math                librust-getrandom-dev       qdbus-qt5                          qtspeech5-speechd-plugin
  libcurl3t64-gnutls         libqt5dbus5t64            libqt5quickwidgets5      libqt5webenginecore5      libreoffice-report-builder-bin  librust-rand-core-dev       qml-module-org-kde-kirigami2       qtwayland5
  libegl-mesa0               libqt5designer5           libqt5script5            libqt5webenginewidgets5   libreoffice-sdbc-hsqldb         librust-sha2-dev            qml-module-qtgraphicaleffects      uno-libs-private
  libexttextcat-data         libqt5gui5t64             libqt5sensors5           libqt5widgets5t64         libreoffice-sdbc-mysql          libselinux1                 qml-module-qtmultimedia            ure
  libgbm1                    libqt5multimedia5         libqt5serialport5        libqt5x11extras5          libreoffice-sdbc-postgresql     libsemanage2                qml-module-qtqml                   ure-java
  libgl1-mesa-dri            libqt5multimediaquick5    libqt5sql5-mysql         libqt5xdgiconloader3      libreoffice-uiconfig-base       libuno-cppu3t64             qml-module-qtquick-controls
  libglx-mesa0               libqt5multimediawidgets5  libqt5sql5-psql          libqt5xml5t64             libreoffice-uiconfig-calc       libuno-cppuhelpergcc3-3t64  qml-module-qtquick-controls2
  libkf5i18nlocaledata5      libqt5network5t64         libqt5sql5-sqlite        libqt5xmlpatterns5        libreoffice-uiconfig-draw       libuno-sal3t64              qml-module-qtquick-dialogs
  libkf5iconthemes5          libqt5networkauth5        libqt5sql5t64            libreoffice               libreoffice-uiconfig-impress    libuno-salhelpergcc3-3t64   qml-module-qtquick-layouts
  libkf5kirigami2-5          libqt5positioning5        libqt5svg5               libreoffice-base          libreoffice-uiconfig-math       mesa-libgallium             qml-module-qtquick-privatewidgets
  libkf5waylandclient5       libqt5printsupport5t64    libqt5test5t64           libreoffice-base-core     libreoffice-uiconfig-writer     node-jest-debbundle         qml-module-qtquick-templates2
  libkf5xmlgui5              libqt5qml5                libqt5texttospeech5      libreoffice-base-drivers  libreoffice-writer              pdf2djvu                    qml-module-qtquick-window2

Summary:
  Upgrading: 1, Installing: 0, Removing: 0, Not Upgrading: 121
  101 not fully installed or removed.
  Download size: 0 B / 673 MB
  Space needed: 8196 kB / 580 MB available

Continue? [Y/n]
Reading changelogs... Done
apt-listchanges: Changelogs
---------------------------

texlive-extra (2026.20260527-1) unstable; urgency=medium

  * New upstream snapshot.
    * Overhauled documentation / manual page for pdfjam (Closes: #974724),
      (Closes: #1091785).
    * Improvements for show-pdf-tags.1 applied (Closes: #1124347).
  * Add patch for arara.1

As you can see, apt claims, that 8196 kB is needed, however, the package seems to need much more: (No space left on device)

So somehow the calcuation done by apt is broken.

#1139562#10
Date:
2026-06-10 08:25:02 UTC
From:
To:
Am Tue, Jun 09, 2026 at 06:46:13PM +0000, schrieb Helge Kreutzmann:
[…]
[…]
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), … 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, …).

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

#1139562#15
Date:
2026-06-11 15:05:31 UTC
From:
To:
Hello David,
thanks for the analysis.

Am Wed, Jun 10, 2026 at 10:25:02AM +0200 schrieb David Kalnischkies:

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.

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

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