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

Re: How to find installed packages not in APT?



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


Reply to: