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
...