When I want to search for a package named z, aptitude finds packages that contain z in the package name (same as LIKE in SQL), so aptitude finds a lot of packages.
How can I search for packages named z?
The pattern given to an aptitude search is a regex, so you can use that to find exact matches:
aptitude search '^z$' When you know the exact package name, you are not really "searching". If you want to see if the package is available, you can use apt-cache policy. The aptitude front-end doesn't really have an equivalent to this, but you can do an aptitude show.
apt-cache policy z aptitude show z aptitude search. Now I think this is a stupid question :p. In fact aptitude show and apt-cache are exactly what I am looking for. Thanks :) If you want to find packages that contain a whole word (e.g. find perl, but not sooperlooper), you can include word boundaries in your search pattern:
$ aptitude search '\bperl\b' Aptitude also supports a wealth of search terms, as described in the reference manual., which allow you to change where exactly it looks for your pattern. For example, to find a Perl for your system, try:
$ aptitude search "?exact-name(perl) ?architecture(amd64)" Answer: apt search -n z
-n stands for --names-only, which obviously should be the default.
aptitude. It also does not solve the issue of searching for exact matches.