As Nick already pointed out, apt-cache search QUERY
should list packages containing specific string in their names.
Another useful tool is apt-file
. apt-file search QUERY
will print list of packages containing files with QUERY
in their names. In some cases you know the name of a binary needed (like when you are reading a tutorial and need some command not installed in your OS) but do not know what package it comes with.
Also, dpkg -S QUERY
lists installed packages which provide files containing 'QUERY' in their names. In some cases you have a binary or script installed on one machine and want it also on another one, but do not remember where it came from. The output should be smaller than for apt-file
in this case, as it does not display content of packages not installed.
You may filter output of those commands with egrep
, say with egrep '/NAME$'
.
e.g. dpkg -S ps | egrep '/bin/ps$'
tells us that ps
binary comes with procps
package.