On 05/10/2023 13:15, David Wright wrote:
On Tue 03 Oct 2023 at 19:58:57 (-0700), Mike Castle wrote:
(apt-mark showauto ; apt-mark showmanual) > apt-thinks-you-installed.txt
dpkg-query --show --showformat='${Package}\n' | grep -v -F -f
apt-thinks-you-installed.txt > rest.txt
(I've added the omitted -f.)

The file "rest.txt" should have a list of packages installed that were
NOT installed via apt.  With any luck, it is small enough to examine
manually.

I don't think your grep will work correctly. apt-thinks-you-installed.txt
contains patterns, and some of those patterns are very short, for example:
an at bc dc di gv jq mc pv tk acl ant apt bbe cpp ftp git gpg gpm kbd
...

Doesn't the -F option mean grep is treating each line in 
apt-thinks-you-installed.txt as a fixed string, not as a pattern?

However, running the above commands here results in a short (~10) list of 
packages none of which I have installed.
dpkg-query --show --showformat='${db:Status-Abbrev} ${Package}\n' outputs a few lines 
that don't start with  "ii" like all the installed packages. I guess they need 
to be filtered out?

--
John

Reply via email to