On Mon, Oct 02, 2023 at 09:43:39AM -0400, The Wanderer wrote: > On 2023-10-02 at 09:28, Ottavio Caruso wrote: > > Yeah, the one for which I had to manually use "dpkg -i". > > That information is not tracked. > > What is tracked is "the package versions known to be available from each > registered repository" and "the package versions which are installed".
There *is* tracking. Packages can be marked as "automatically installed" or not. The problem is, the marking is not consistent with user expectations. >From apt-patterns(7): ?automatic, ~M Selects packages that were installed automatically. [...] EXAMPLES [...] apt list '~i !~M (~slibs|~sperl|~spython)' List all manually-installed packages in sections matching libs, perl, or python. But if you try this locally, you'll discover that a bunch of packages are listed which you don't expect. unicorn:~$ apt list '~i !~M' Listing... Done abcde/stable,stable,now 2.9.3-1 all [installed] acl/stable,now 2.3.1-3 amd64 [installed] adduser/stable,stable,now 3.134 all [installed] alsa-utils/stable,now 1.2.8-1 amd64 [installed] an/stable,now 1.2-7+b1 amd64 [installed] apt-listchanges/stable,stable,now 3.24 all [installed] apt-transport-https/stable,stable,now 2.6.1 all [installed] apt-utils/stable,now 2.6.1 amd64 [installed] apt/stable,now 2.6.1 amd64 [installed] aptitude/stable,now 0.8.13-5 amd64 [installed] at/stable,now 3.2.5-1+b1 amd64 [installed] [...] I didn't need to install "adduser" or "apt" manually, for example, and yet they're listed here. As it turns out, most (or all?) of the packages that were installed by the installer *also* show up as manually installed. This makes it unsuitable for most people's purposes.