[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to find installed packages not in APT?



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 <martin@simon.tf>
> 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
lorenl@north-winds.org
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

Attachment: signature.asc
Description: PGP signature


Reply to: