๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by Vincent Lefevre Tue, 10 Nov 2026 16:00
Bug#1153640: aptitude: "aptitude why" should consider non-autoremoved packages as a fallback
#4028
Author: Vincent Lefevre
Date: Tue, 10 Nov 2026 16:00
158 lines
8568 bytes
Package: aptitude
Version: 0.8.13-8.1+b1
Severity: wishlist

The aptitude(8) man page says about "aptitude why":

  If no patterns are present, then aptitude will search for dependency
  chains beginning at manually installed packages. This effectively
  shows the packages that have caused or would cause a given package
  to be installed.

However, it may happen that for some package, there was initially such
a chain, but due to an upgrade, the chain no longer exists while the
package is still not autoremoved because it is still required by a
package in some non-autoremoved list (there seems to be such a list
for aptitude, but this is not documented).

An example:

disset:~> aptitude why linux-modules-7.2.15+deb14-amd64
Automatically installed, current version 7.2.15-1, priority optional
No dependencies require to install linux-modules-7.2.15+deb14-amd64

The message "No dependencies require..." could be improved because
there is actually a dependency (see bug 1153632 I've just reported):

  linux-image-7.2.15+deb14-amd64 โ†’ linux-modules-7.2.15+deb14-amd64

found with

disset:~> apt remove -s linux-modules-7.2.15+deb14-amd64
[...]
REMOVING:
  linux-image-7.2.15+deb14-amd64  linux-modules-7.2.15+deb14-amd64
[...]

(note that however, this could not have been found if this had just
been a "Recommends:", while aptitude honors "Recommends:").

Moreover, if no chains from manually installed packages are found,
aptitude could try chains from non-autoremoved packages. Giving
information about such a case would be useful for the user, who
may wonder why some package has not been autoremoved.

More details about this example:

On another machine, where linux-image-amd64 still depends on
linux-image-7.2.15+deb14-amd64 because I haven't upgraded it
yet (linux-image-amd64 is still at version 7.2.15-1):

cventin:~> aptitude why linux-modules-7.2.15+deb14-amd64
i   linux-image-amd64              Depends linux-image-7.2.15+deb14-amd64 (= 7.2.15-1)
i A linux-image-7.2.15+deb14-amd64 Depends linux-modules-7.2.15+deb14-amd64 (= 7.2.15-1)

On disset, linux-image-7.2.15+deb14-amd64 is also automatically
installed; but linux-image-amd64 is now at version 7.3.3-1, so that no
manually installed packages depend on linux-image-7.2.15+deb14-amd64
anymore. But linux-image-7.2.15+deb14-amd64 is not proposed as being
autoremoved by aptitude.

See also bug 902652 (which is not clear to me).

Note: Bug report corrected and improved thanks to AI. There may
be still things that are unclear (I've already spent much time).
For the reference:
  https://chat.mistral.ai/work/184ca06c-4f7a-4576-989b-806c34ec62a3

-- Package-specific info:
Terminal: xterm-256color
$DISPLAY is set.
which aptitude: /usr/bin/aptitude

aptitude version information:
aptitude 0.8.13
Compiler: g++ 16.2.0
Compiled against:
  apt version 7.0.0
  NCurses version 6.6
  libsigc++ version: 2.12.1
  Gtk+ support disabled.
  Qt support disabled.

Current library versions:
  NCurses version: ncurses 6.6.20260608
  cwidget version: 0.5.18
  Apt version: 7.0.0

aptitude linkage:
	linux-vdso.so.1 (0x00007fa95d182000)
	libapt-pkg.so.7.0 => /usr/lib/x86_64-linux-gnu/libapt-pkg.so.7.0 (0x00007fa95c800000)
	libncursesw.so.6 => /usr/lib/x86_64-linux-gnu/libncursesw.so.6 (0x00007fa95d125000)
	libtinfo.so.6 => /usr/lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007fa95d0ef000)
	libsigc-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0 (0x00007fa95d0e7000)
	libcwidget.so.4 => /usr/lib/x86_64-linux-gnu/libcwidget.so.4 (0x00007fa95caf8000)
	libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007fa95c65b000)
	libboost_iostreams.so.1.92.0 => /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.92.0 (0x00007fa95d0cd000)
	libxapian.so.30 => /usr/lib/x86_64-linux-gnu/libxapian.so.30 (0x00007fa95c200000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fa95be00000)
	libm.so.6 => /usr/lib/x86_64-linux-gnu/libm.so.6 (0x00007fa95c545000)
	libgcc_s.so.1 => /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa95c517000)
	libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x00007fa95bc0a000)
	libz.so.1 => /usr/lib/x86_64-linux-gnu/libz.so.1 (0x00007fa95c1e0000)
	libbz2.so.1.0 => /usr/lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007fa95d0b7000)
	liblzma.so.5 => /usr/lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fa95c1ad000)
	liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fa95c181000)
	libzstd.so.1 => /usr/lib/x86_64-linux-gnu/libzstd.so.1 (0x00007fa95c0b7000)
	libudev.so.1 => /usr/lib/x86_64-linux-gnu/libudev.so.1 (0x00007fa95bbbc000)
	libsystemd.so.0 => /usr/lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fa95ba7b000)
	libcrypto.so.3 => /usr/lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007fa95b400000)
	libxxhash.so.0 => /usr/lib/x86_64-linux-gnu/libxxhash.so.0 (0x00007fa95cae2000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fa95d184000)
	libuuid.so.1 => /usr/lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fa95c50d000)

-- System Information:
Debian Release: forky/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 7.2.15+deb14-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages aptitude depends on:
ii  aptitude-common           0.8.13-8.1
ii  libapt-pkg7.0             3.3.7
ii  libboost-iostreams1.92.0  1.92.0-4+b1
ii  libc6                     2.43-7
ii  libcwidget4               0.5.18-6+b3
ii  libgcc-s1                 16.2.0-4
ii  libncursesw6              6.6+20260608-2
ii  libsigc++-2.0-0v5         2.12.1-4+b1
ii  libsqlite3-0              3.54.1-2
ii  libstdc++6                16.2.0-4
ii  libtinfo6                 6.6+20260608-2
ii  libxapian30               1.4.32-1

Versions of packages aptitude recommends:
ii  libdpkg-perl    1.23.11
ii  sensible-utils  0.0.26

Versions of packages aptitude suggests:
pn  apt-xapian-index                <none>
ii  aptitude-doc-en [aptitude-doc]  0.8.13-8.1
pn  debtags                         <none>
ii  tasksel                         3.91

-- Configuration Files:
/etc/logrotate.d/aptitude changed [not included]

-- no debconf information

-- 
Vincent Lefรจvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads