[Bug 253761] Re: apt-cache search --names-only gives many false positives

Jarno Suni 253761 at bugs.launchpad.net
Sun May 22 09:09:39 UTC 2016

The bug is present in Ubuntu 16.04; apt version 1.2.10 (amd64)

$ apt-cache search --names-only ab|grep -cv ab

Furthermore, the command does not restrict to the package names even if the option suggests it does.
The following script should print 0:

$ apt-cache search --names-only ab|cut -d' ' -f1|grep -cv ab

You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.

  apt-cache search --names-only  gives many false positives

Status in apt package in Ubuntu:

Bug description:
  Binary package hint: apt

  The manpage for apt-cache says that --names-only  should "Only search
  on the package names, not the long descriptions."

  And yet it frequently lists packages that do not have the search terms
  in the name or short description.

  Example: (bash script)

  for x in ab bc de ef
      echo "False positives for apt-cache search --names-only '$x':"
      apt-cache search --names-only $x | grep -iv $x

  I get 99 false positives, attached is the output of the above script
  on my box.

  I have ubuntu hardy, and I did "apt-get update" and "apt-get upgrade"
  a few days ago. I don't think this bug is new.

To manage notifications about this bug go to:

More information about the foundations-bugs mailing list