• Re: How to find installed packages not in APT?

    From Andy Smith@21:1/5 to Loren M. Lang on Mon Feb 3 12:20:02 2025
    Hi Loren,

    On Sun, Feb 02, 2025 at 11:29:45PM -0800, Loren M. Lang wrote:
    I am looking for a way to find all packages that have been installed on
    my system according to dpkg, but don't have a matching entry in Apt.

    Packages installed with dpkg -i *do* show in apt, so can you be more
    specific about what you are looking for?

    Example:

    $ sudo dpkg -i ~/Downloads/zola_0.19.0-1_amd64_bookworm.deb
    $ apt show zola
    Package: zola
    Version: 0.19.0-1
    Status: install ok installed
    Priority: optional
    Section: web
    Maintainer: Martin Simon <[email protected]>
    Installed-Size: 38.1 MB
    Depends: libc6 (>= 2.35), libgcc-s1 (>= 4.2)
    Homepage: https://github.com/getzola/zola
    Download-Size: unknown
    APT-Manual-Installed: yes
    APT-Sources: /var/lib/dpkg/status
    Description: A fast static site generator in a single binary with everything built-in.
    Zola is a static site generator (SSG), similar to Hugo, Pelican, and Jekyll
    (for a comprehensive list of SSGs, please see Jamstack). It is written in
    Rust and uses the Tera template engine, which is similar to Jinja2, Django
    templates, Liquid, and Twig. Content is written in CommonMark, a strongly
    defined, highly compatible specification of Markdown.

    I would like to do it in a very programatic way without relying on
    output aimed for human if possible. Just grepping the output of dpkg -l,
    for example, means I have to exclude headers and ensure that the column doesn't get truncated or otherwise mangled.

    dpkg-query is usually used for structured queries of the dpkg database.

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Loren M. Lang@21:1/5 to All on Mon Feb 3 08:40:01 2025
    I am looking for a way to find all packages that have been installed on
    my system according to dpkg, but don't have a matching entry in Apt.
    This is likely due to being installed manually from a third-party
    website or because it was left over from a previous upgrade and not
    removed. Also, just for good measure, I'd like to identify any packages
    that in Apt, but don't match the exact version from Apt because I have
    manually patched them and bumped their version number for some reason.

    I would like to do it in a very programatic way without relying on
    output aimed for human if possible. Just grepping the output of dpkg -l,
    for example, means I have to exclude headers and ensure that the column
    doesn't get truncated or otherwise mangled.
    --
    Loren M. Lang
    [email protected]
    http://www.north-winds.org/
    IRC: penguin359


    Public Key: http://www.north-winds.org/lorenl_pubkey.asc
    Fingerprint: 7896 E099 9FC7 9F6C E0ED E103 222D F356 A57A 98FA

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

    iHUEABEIAB0WIQT3wmbBr9cpdt12HlPMe9wUn2Md1wUCZ6BwXwAKCRDMe9wUn2Md 1+39AP40tTx6j62nBGbVmeGHhj0K9B83wUhFuMDPl2ABkH/3zwEA2y6KX8GKPFz7 7T4s+mw2tfnsnTLhN1hK5P2oLFlW9jw=
    =HxQP
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to All on Mon Feb 3 15:50:02 2025
    On Mon, Feb 03, 2025 at 15:18:59 +0100, J�rg-Volker Peetz wrote:
    you could check for obsolete packages, depending on the apt version, with

    $ apt list '~o'

    Oh, right. *That* is probably what the OP was really looking for:
    packages that have been installed in the past but are no longer
    installable from repositories because they've been superseded, or
    generated locally, or because their repositories have been removed from sources.list, or whatever.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?J=C3=B6rg-Volker_Peetz?=@21:1/5 to All on Mon Feb 3 15:20:01 2025
    Hi,
    you could check for obsolete packages, depending on the apt version, with

    $ apt list '~o'

    Also looking for broken or garbage packets could help:

    $ apt list '~b' '~g'

    Of course, the output will depend on how your sources file (/etc/apt/sources.list, etc.) looks like.

    If you think there could be a discrepancy between the list of packages known to dpkg and apt, you could test with something like this one-liner

    $ dpkg --get-selections | awk '{gsub(":amd64","") ; print $1}' |
    (apt list '~i' | awk -F'/' 'FNR > 1 {print $1}' | sort | diff /dev/fd/5 -) 5<&0

    Regards,
    Jörg.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Loren M. Lang@21:1/5 to Andy Smith on Tue Feb 4 02:20:01 2025
    On Mon, Feb 03, 2025 at 11:09:58AM +0000, Andy Smith wrote:
    Hi Loren,

    On Sun, Feb 02, 2025 at 11:29:45PM -0800, Loren M. Lang wrote:
    I am looking for a way to find all packages that have been installed on
    my system according to dpkg, but don't have a matching entry in Apt.

    Packages installed with dpkg -i *do* show in apt, so can you be more
    specific about what you are looking for?

    Yes, I am specifically trying to find packages that don't match entries
    from the package lists downloaded in main, non-free, contrib, etc.
    Basically, I want to identify any software that I couldn't reinstall on
    a fresh install of Debian from the official Debian archives.


    Example:

    $ sudo dpkg -i ~/Downloads/zola_0.19.0-1_amd64_bookworm.deb
    $ apt show zola
    Package: zola
    Version: 0.19.0-1
    Status: install ok installed
    Priority: optional
    Section: web
    Maintainer: Martin Simon <[email protected]>
    Installed-Size: 38.1 MB
    Depends: libc6 (>= 2.35), libgcc-s1 (>= 4.2)
    Homepage: https://github.com/getzola/zola
    Download-Size: unknown
    APT-Manual-Installed: yes
    APT-Sources: /var/lib/dpkg/status
    Description: A fast static site generator in a single binary with everything built-in.
    Zola is a static site generator (SSG), similar to Hugo, Pelican, and Jekyll
    (for a comprehensive list of SSGs, please see Jamstack). It is written in
    Rust and uses the Tera template engine, which is similar to Jinja2, Django
    templates, Liquid, and Twig. Content is written in CommonMark, a strongly
    defined, highly compatible specification of Markdown.

    I would like to do it in a very programatic way without relying on
    output aimed for human if possible. Just grepping the output of dpkg -l, for example, means I have to exclude headers and ensure that the column doesn't get truncated or otherwise mangled.

    dpkg-query is usually used for structured queries of the dpkg database.

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting


    --
    Loren M. Lang
    [email protected]
    http://www.north-winds.org/
    IRC: penguin359


    Public Key: http://www.north-winds.org/lorenl_pubkey.asc
    Fingerprint: 7896 E099 9FC7 9F6C E0ED E103 222D F356 A57A 98FA

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

    iHUEABEIAB0WIQT3wmbBr9cpdt12HlPMe9wUn2Md1wUCZ6FqWQAKCRDMe9wUn2Md 12NEAQC8JsIUXk71rSwgSy2z8XpQiFTI2jUaq/Bo2i7F8RmdMQEA5B+/Jpa+MlYN LfPLefx76dCiMQ1oRZNTIVmcBDBvJWQ=
    =7qxM
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gene heskett@21:1/5 to Mike Castle on Tue Feb 4 05:40:01 2025
    On 2/3/25 21:10, Mike Castle wrote:
    On Mon, Feb 3, 2025 at 5:16 PM Loren M. Lang <[email protected]> wrote:
    Basically, I want to identify any software that I couldn't reinstall on
    a fresh install of Debian from the official Debian archives.
    Will this work as a starting place for you?

    comm -23 <(dpkg-query -W -f '${Package} ${Version}\n' | sort -u)
    <(apt-cache dumpavail | awk '/^Package:/ {package = $NF} /^Version:/
    {version = $NF} /^$/ {print package, version}' | sort -u)

    looking for any clue that might fix my busted bookworm install, however
    this will not execute, either as me or sudo: error reported is no
    permission for /dev/fd/63 when in fact /dev/fd/ only contains 0, 1, 2, 3
    as subdirs.

     gene@coyote:/$ sudo -i
    root@coyote:~# comm -23 <(dpkg-query -W -f '${Package} ${Version}\n' |
    sort -u)
    <(apt-cache dumpavail | awk '/^Package:/ {package = $NF} /^Version:/
    {version = $NF} /^$/ {print package, version}' | sort -u)
    comm: missing operand after ‘/dev/fd/63’
    Try 'comm --help' for more information.
    -bash: /dev/fd/63: Permission denied

    .

    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to gene heskett on Tue Feb 4 06:10:01 2025
    On Mon, Feb 03, 2025 at 23:33:50 -0500, gene heskett wrote:
     gene@coyote:/$ sudo -i
    root@coyote:~# comm -23 <(dpkg-query -W -f '${Package} ${Version}\n' | sort -u)
    <(apt-cache dumpavail | awk '/^Package:/ {package = $NF} /^Version:/
    {version = $NF} /^$/ {print package, version}' | sort -u)
    comm: missing operand after ‘/dev/fd/63’
    Try 'comm --help' for more information.
    -bash: /dev/fd/63: Permission denied

    Is there a newline in the middle of this command that shouldn't be
    there?

    The errors that you're seeing here are consistent with the comm -23
    command only having ONE of the <() process substitutions as an argument,
    and then the second <() proc sub being on a line by itself.

    hobbit:~$ sudo -i
    [sudo] password for greg:
    root@hobbit:~# <(echo hi)
    -bash: /dev/fd/63: Permission denied

    I'm guessing you pasted the command out of a mail program or web browser,
    in which the code had an extra newline added.

    There should be a space (not a newline) between "-u)" and "<(apt-cache".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Loren M. Lang@21:1/5 to Mike Castle on Tue Feb 4 07:30:01 2025
    On Mon, Feb 03, 2025 at 06:09:38PM -0800, Mike Castle wrote:
    On Mon, Feb 3, 2025 at 5:16 PM Loren M. Lang <[email protected]> wrote:
    Basically, I want to identify any software that I couldn't reinstall on
    a fresh install of Debian from the official Debian archives.

    Will this work as a starting place for you?

    comm -23 <(dpkg-query -W -f '${Package} ${Version}\n' | sort -u)
    <(apt-cache dumpavail | awk '/^Package:/ {package = $NF} /^Version:/
    {version = $NF} /^$/ {print package, version}' | sort -u)

    Thanks everything for the various suggestions. It's allowed me to
    quickly identify packages like python2 and libsqlite0 that have been
    left on my system over many years of upgrades. My oldest server was
    installed in 2009. It's also help identify packages like jlink and zoom
    that I installed long ago and have forgotten about. Now, I can work on
    purging old packages and updating those that don't provide their own
    repos. Zoom does have a repo, but apparently my sources.list was
    disabled during my last upgrade. Segger, however, only provides binary
    packages which have to be manually downloaded so I have to periodically
    check for updates myself.

    --
    Loren M. Lang
    [email protected]
    http://www.north-winds.org/
    IRC: penguin359


    Public Key: http://www.north-winds.org/lorenl_pubkey.asc
    Fingerprint: 7896 E099 9FC7 9F6C E0ED E103 222D F356 A57A 98FA

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

    iHUEABEIAB0WIQT3wmbBr9cpdt12HlPMe9wUn2Md1wUCZ6GxtAAKCRDMe9wUn2Md 1+EAAQCBU4UjXr6xCGAO5eGAx84YCRuDZen1RYkOaoVnw2JOfwD/QZzJPAc59urJ ZTrTG8MDmSqb1c4iJwv+PllnhdDnhEc=
    =HkZO
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gene heskett@21:1/5 to Greg Wooledge on Tue Feb 4 09:50:01 2025
    On 2/4/25 00:02, Greg Wooledge wrote:
    On Mon, Feb 03, 2025 at 23:33:50 -0500, gene heskett wrote:
     gene@coyote:/$ sudo -i
    root@coyote:~# comm -23 <(dpkg-query -W -f '${Package} ${Version}\n' | sort >> -u)
    <(apt-cache dumpavail | awk '/^Package:/ {package = $NF} /^Version:/
    {version = $NF} /^$/ {print package, version}' | sort -u)
    comm: missing operand after ‘/dev/fd/63’
    Try 'comm --help' for more information.
    -bash: /dev/fd/63: Permission denied
    Is there a newline in the middle of this command that shouldn't be
    there?

    The errors that you're seeing here are consistent with the comm -23
    command only having ONE of the <() process substitutions as an argument,
    and then the second <() proc sub being on a line by itself.

    hobbit:~$ sudo -i
    [sudo] password for greg:
    root@hobbit:~# <(echo hi)
    -bash: /dev/fd/63: Permission denied

    I'm guessing you pasted the command out of a mail program or web browser,
    in which the code had an extra newline added.

    There should be a space (not a newline) between "-u)" and "<(apt-cache".
    Thank you, you were correct, and I fed it to wc -l to get 3807 in the
    listing.
    .

    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrew M.A. Cater@21:1/5 to gene heskett on Tue Feb 4 13:10:01 2025
    On Mon, Feb 03, 2025 at 11:33:50PM -0500, gene heskett wrote:
    On 2/3/25 21:10, Mike Castle wrote:
    On Mon, Feb 3, 2025 at 5:16 PM Loren M. Lang <[email protected]> wrote:
    Basically, I want to identify any software that I couldn't reinstall on
    a fresh install of Debian from the official Debian archives.
    Will this work as a starting place for you?

    comm -23 <(dpkg-query -W -f '${Package} ${Version}\n' | sort -u) <(apt-cache dumpavail | awk '/^Package:/ {package = $NF} /^Version:/ {version = $NF} /^$/ {print package, version}' | sort -u)

    looking for any clue that might fix my busted bookworm install, however this will not execute, either as me or sudo: error reported is no permission for /dev/fd/63 when in fact /dev/fd/ only contains 0, 1, 2, 3 as subdirs.


    apt list '~o'

    That's probably a good start as listed in another message in the thread.
    Try that one as well.

    If you have so many busted packages, come back to the list.

    All the very best, as ever,

    Andy
    ([email protected])


    .

    Cheers, Gene Heskett, CET.
    --
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author, 1940)
    If we desire respect for the law, we must first make the law respectable.
    - Louis D. Brandeis


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Mike Castle on Tue Feb 4 17:40:01 2025
    On Tue, Feb 04, 2025 at 08:12:42 -0800, Mike Castle wrote:
    On Tue, Feb 4, 2025 at 4:04 AM Andrew M.A. Cater <[email protected]> wrote:
    apt list '~o'

    Where is '~o' documented? apt(1) mentions dpkg-query, but I couldn't
    find it mentioned there either.

    It's documented as part of "aptitude", I believe, but it's not in the aptitude(8) man page, because that would be too easy.

    <https://manpages.debian.org/bookworm/aptitude/aptitude.8.en.html>
    includes this paragraph (buried deep, searching for ~ eventually gets
    to it):

    This command accepts package names or patterns as arguments. If
    the string contains a tilde character (“~”) or a question mark
    (“?”), it will be treated as a search pattern and every package
    matching the pattern will be considered (see the section “Search
    Patterns” in the aptitude reference manual).

    So apparently you need to find the "aptitude reference manual". Whatever
    that is. I'm pretty sure it's not anywhere on a Standard installation.

    It's not in <https://packages.debian.org/bookworm/amd64/aptitude/filelist>
    as far as I can see, either.

    Maybe it's in <https://packages.debian.org/bookworm/amd64/aptitude-doc-en/filelist>?
    Who knows.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrew M.A. Cater@21:1/5 to Mike Castle on Tue Feb 4 17:50:01 2025
    On Tue, Feb 04, 2025 at 08:43:28AM -0800, Mike Castle wrote:
    On Tue, Feb 4, 2025 at 8:34 AM Greg Wooledge <[email protected]> wrote:

    On Tue, Feb 04, 2025 at 08:12:42 -0800, Mike Castle wrote:
    On Tue, Feb 4, 2025 at 4:04 AM Andrew M.A. Cater <[email protected]> wrote:
    apt list '~o'

    Where is '~o' documented? apt(1) mentions dpkg-query, but I couldn't find it mentioned there either.

    It's documented as part of "aptitude", I believe, but it's not in the aptitude(8) man page, because that would be too easy.

    Ahhh. Never used aptitude, not even installed on my systems. (Then
    again, I still use dselect sometimes so... )


    Hi Mike,

    Mentioning dselect - that will give you all the obsolete packages it
    can't find - usually at the top of the interface but it does need
    some degree of expertise to unravel what it shows.

    (I just used dselect to find obscure packages I'd long since thought
    that I'd purged).

    All the very best, as ever,

    Andrew Cater
    ([email protected])

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrew M.A. Cater@21:1/5 to Greg Wooledge on Tue Feb 4 17:50:01 2025
    On Tue, Feb 04, 2025 at 11:23:58AM -0500, Greg Wooledge wrote:
    On Tue, Feb 04, 2025 at 08:12:42 -0800, Mike Castle wrote:
    On Tue, Feb 4, 2025 at 4:04 AM Andrew M.A. Cater <[email protected]> wrote:
    apt list '~o'

    Where is '~o' documented? apt(1) mentions dpkg-query, but I couldn't
    find it mentioned there either.

    It's documented as part of "aptitude", I believe, but it's not in the aptitude(8) man page, because that would be too easy.


    It's documented as part of aptitude and apt, yes.

    <https://manpages.debian.org/bookworm/aptitude/aptitude.8.en.html>
    includes this paragraph (buried deep, searching for ~ eventually gets
    to it):

    This command accepts package names or patterns as arguments. If
    the string contains a tilde character (“~”) or a question mark
    (“?”), it will be treated as a search pattern and every package
    matching the pattern will be considered (see the section “Search
    Patterns” in the aptitude reference manual).


    I think it's just searching for a status matching ?o - so that matches "obsolete", for example.

    Trying it with '~i' gives you everything that is i[nstalled], by comparison. That's a long list, going down to zstd.

    aptitude list -h gives you more help detail.

    Hope this helps - all the best, as ever,

    Andrew Cater
    ([email protected])



    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Max Nikulin on Tue Feb 4 18:20:01 2025
    On Wed, Feb 05, 2025 at 00:00:13 +0700, Max Nikulin wrote:
    - apt-patterns(7)

    Why isn't this linked/referenced from apt(8) or apt-get(8) or aptitude(8)?
    I just checked all three, and it's not on any of them.

    That's slightly easier to remember than <https://www.debian.org/doc/manuals/aptitude/ch02s04s05.en.html>, I
    suppose. Not that I'll remember it by the next time this question is
    asked again. Not without it being referenced from somewhere that
    humans will actually look.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Andrew M.A. Cater on Tue Feb 4 18:20:02 2025
    On Tue, Feb 04, 2025 at 16:44:06 +0000, Andrew M.A. Cater wrote:
    On Tue, Feb 04, 2025 at 11:23:58AM -0500, Greg Wooledge wrote:
    <https://manpages.debian.org/bookworm/aptitude/aptitude.8.en.html>
    includes this paragraph (buried deep, searching for ~ eventually gets
    to it):

    This command accepts package names or patterns as arguments. If
    the string contains a tilde character (“~”) or a question mark
    (“?”), it will be treated as a search pattern and every package
    matching the pattern will be considered (see the section “Search
    Patterns” in the aptitude reference manual).


    I think it's just searching for a status matching ?o - so that matches "obsolete", for example.

    Trying it with '~i' gives you everything that is i[nstalled], by comparison. That's a long list, going down to zstd.

    aptitude list -h gives you more help detail.

    The tilde patterns are definitely not in the output of "aptitude list -h".
    I just installed it to try it to find out.

    A google search for "aptitude reference manual" brings me to <https://www.debian.org/doc/manuals/aptitude/> which is entitled
    "aptitude user's manual". It has a "Search patterns" section
    (at <https://www.debian.org/doc/manuals/aptitude/ch02s04.en.html>)
    which might or might not be what the man page was talking about.

    Following the pages, <https://www.debian.org/doc/manuals/aptitude/ch02s04s02.en.html> is the
    first place the tilde is mentioned. It has a link to <https://www.debian.org/doc/manuals/aptitude/ch02s04s05.en.html#tableSearchTermQuickGuide>
    which FINALLY appears to document the feature.

    Since the table is practically at the top of the page, we don't really
    need the anchor reference, so my final answer is:

    https://www.debian.org/doc/manuals/aptitude/ch02s04s05.en.html

    That easily typed and easily memorized link appears to be what we
    wanted to see when we typed the overly long and convoluted "man apt".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to David Wright on Tue Feb 4 20:10:01 2025
    On Tue, Feb 04, 2025 at 11:25:46 -0600, David Wright wrote:
    On Tue 04 Feb 2025 at 12:15:32 (-0500), Greg Wooledge wrote:
    On Wed, Feb 05, 2025 at 00:00:13 +0700, Max Nikulin wrote:
    - apt-patterns(7)

    Why isn't this linked/referenced from apt(8) or apt-get(8) or aptitude(8)? I just checked all three, and it's not on any of them.

    That's slightly easier to remember than <https://www.debian.org/doc/manuals/aptitude/ch02s04s05.en.html>, I suppose. Not that I'll remember it by the next time this question is
    asked again. Not without it being referenced from somewhere that
    humans will actually look.

    I'm in the habit of typing:

    man apt- <TAB> <TAB>

    I would not fancy the job of coordinating or unifying all the APT documentation that's sprung up over the years.

    It doesn't need to be unified. The pages just need to refer to each
    other properly.

    Start with aptitude(8). Instead of talking about some "aptitude
    reference manual", it should just say "see apt-patterns(7)". There
    are several places where that change should happen. Then, for good
    measure, add apt-patterns(7) to the SEE ALSO section.

    Next, look at apt(8). The list subcommand mentions "glob(7) patterns".
    But that's not really accurate, is it? It should talk about
    apt-patterns(7) instead. And then add it to the SEE ALSO, and voila.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Loren M. Lang@21:1/5 to Greg Wooledge on Tue Feb 4 20:10:01 2025
    On Tue, Feb 04, 2025 at 12:15:32PM -0500, Greg Wooledge wrote:
    On Wed, Feb 05, 2025 at 00:00:13 +0700, Max Nikulin wrote:
    - apt-patterns(7)

    Why isn't this linked/referenced from apt(8) or apt-get(8) or aptitude(8)?
    I just checked all three, and it's not on any of them.

    It is references in the SEE ALSO section of the apt(8) man page which is
    how I found it, but only after someone else on this list pointed me at
    the `apt list '~o'` command. Also, it is references earlier under the
    list subcommand:

    list
    list is somewhat similar to dpkg-query --list in
    that it can display a list of packages satisfying
    certain criteria. It supports glob(7) patterns for
    matching package names, apt-patterns(7), as well as
    options to list installed (--installed),
    upgradeable (--upgradeable) or all available (--all-versions) versions.

    I am still trying to figure out where that data comes from. Maybe it
    literally is just what I asked for, matching packages from the installed
    list and without a matching entry in a current Apt repository list file?
    So, then will my broadcom driver appear in the obsolete list if I
    comment out the non-free-firmware section from sources.list? I'll have
    to test that out.


    That's slightly easier to remember than <https://www.debian.org/doc/manuals/aptitude/ch02s04s05.en.html>, I
    suppose. Not that I'll remember it by the next time this question is
    asked again. Not without it being referenced from somewhere that
    humans will actually look.


    --
    Loren M. Lang
    [email protected]
    http://www.north-winds.org/
    IRC: penguin359


    Public Key: http://www.north-winds.org/lorenl_pubkey.asc
    Fingerprint: 7896 E099 9FC7 9F6C E0ED E103 222D F356 A57A 98FA

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

    iHUEABEIAB0WIQT3wmbBr9cpdt12HlPMe9wUn2Md1wUCZ6JkowAKCRDMe9wUn2Md 12/vAP0WwxEhJ7SIHkInE8bAlpGNNsYP0HvGZ+YOYCZ6h5ZeEQD+Jhadng56Vxts OOi//tNVay3dlB5GxZFksYa3r9SLCKM=
    =UMq6
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Loren M. Lang on Tue Feb 4 20:20:01 2025
    On Tue, Feb 04, 2025 at 11:04:16 -0800, Loren M. Lang wrote:
    On Tue, Feb 04, 2025 at 12:15:32PM -0500, Greg Wooledge wrote:
    On Wed, Feb 05, 2025 at 00:00:13 +0700, Max Nikulin wrote:
    - apt-patterns(7)

    Why isn't this linked/referenced from apt(8) or apt-get(8) or aptitude(8)? I just checked all three, and it's not on any of them.

    It is references in the SEE ALSO section of the apt(8) man page which is
    how I found it,

    Not in Bookworm, it isn't. But you're saying it's been improved in
    Trixie or something? That's good!

    Also, it is references earlier under the
    list subcommand:

    list
    list is somewhat similar to dpkg-query --list in
    that it can display a list of packages satisfying
    certain criteria. It supports glob(7) patterns for
    matching package names, apt-patterns(7), as well as
    options to list installed (--installed),
    upgradeable (--upgradeable) or all available (--all-versions) versions.

    Hah. All the things I asked for in the message I wrote 5 minutes ago
    are apparently already done in some future version of Debian.

    I am still trying to figure out where that data comes from. Maybe it literally is just what I asked for, matching packages from the installed
    list and without a matching entry in a current Apt repository list file?

    Yes. That's all there is.

    So, then will my broadcom driver appear in the obsolete list if I
    comment out the non-free-firmware section from sources.list? I'll have
    to test that out.

    You also have to run "apt update" or an equivalent.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to Greg Wooledge on Tue Feb 4 22:40:01 2025
    Greg Wooledge <[email protected]> wrote:
    On Tue, Feb 04, 2025 at 11:04:16 -0800, Loren M. Lang wrote:
    On Tue, Feb 04, 2025 at 12:15:32PM -0500, Greg Wooledge wrote:
    On Wed, Feb 05, 2025 at 00:00:13 +0700, Max Nikulin wrote:
    - apt-patterns(7)

    Why isn't this linked/referenced from apt(8) or apt-get(8) or aptitude(8)? I just checked all three, and it's not on any of
    them.

    It is references in the SEE ALSO section of the apt(8) man page
    which is how I found it,

    Not in Bookworm, it isn't. But you're saying it's been improved in
    Trixie or something? That's good!

    Also, it is references earlier under the
    list subcommand:

    list
    list is somewhat similar to dpkg-query --list
    in that it can display a list of packages satisfying
    certain criteria. It supports glob(7)
    patterns for matching package names, apt-patterns(7), as well as
    options to list installed (--installed),
    upgradeable (--upgradeable) or all available (--all-versions) versions.

    Hah. All the things I asked for in the message I wrote 5 minutes ago
    are apparently already done in some future version of Debian.

    I think part of the confusion is that there are various references to a mythical "Aptitude Reference Manual" which are actually [I think]
    referring to the "aptitude reference guide" otherwise known as Chapter
    2 of the "aptitude user's manual" - https://www.debian.org/doc/manuals/aptitude/ch02.en.html and which
    contains a section on search patterns that itself contains a subsection
    on search term reference https://www.debian.org/doc/manuals/aptitude/ch02s04s05.en.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Woodall@21:1/5 to Loren M. Lang on Tue Feb 4 22:30:01 2025
    On Mon, 3 Feb 2025, Loren M. Lang wrote:

    On Mon, Feb 03, 2025 at 11:09:58AM +0000, Andy Smith wrote:
    Hi Loren,

    On Sun, Feb 02, 2025 at 11:29:45PM -0800, Loren M. Lang wrote:
    I am looking for a way to find all packages that have been installed on
    my system according to dpkg, but don't have a matching entry in Apt.

    Packages installed with dpkg -i *do* show in apt, so can you be more
    specific about what you are looking for?

    Yes, I am specifically trying to find packages that don't match entries
    from the package lists downloaded in main, non-free, contrib, etc.
    Basically, I want to identify any software that I couldn't reinstall on
    a fresh install of Debian from the official Debian archives.


    I forget which option it is but
    apt list "~c"

    or

    apt list "~o"

    is probably close to what you want - I think it's the second. The first
    I think is for uninstalled packages that have config left behind but I
    didn't make notes.

    IIRC this also works:

    apt list --installed | grep ,local

    which I used for ages before I discovered the "~o" option. The comma is important to filter out any packages that have local in their name, for example:
    libencode-locale-perl/stable,now 1.05-3 all [installed,automatic]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?J=C3=B6rg-Volker_Peetz?=@21:1/5 to All on Wed Feb 5 10:10:01 2025
    It's documented in the man page of apt-patterns.

    Regards,
    Jörg.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)