24
6
I do know http://packages.debian.org/ provide the search facillity.
The problem is how could I search the packages with just command line?
24
6
I do know http://packages.debian.org/ provide the search facillity.
The problem is how could I search the packages with just command line?
32
The apt-cache search
command will return all packages that have name
in the package name or description:
apt-cache search name
Once you have a package name, you can get more detailed information on the package using the apt-cache show
and apt-cache showpkg
commands.
apt-cache show package_name
apt-cache showpkg package_name
apt list package_name
is even easier; apt search query_string
if you want to search for all instances of a given string in the package database. – Nick May – 2019-02-23T21:23:43.190
3+: apt-cache search --names-only search only the package names. – Jichao – 2009-11-04T12:22:55.670
+: 'apt-cache show package_name' display package metadata,e.g,version,name,source,arch,size and 'apt-cache showpkg package_name' mainly show the version,and the very detailed forwad/reverse dependencies. – Jichao – 2009-11-04T12:33:40.670
3
apt-cache search
+1 This is the one. It'll search descriptions as well as names, and isn't as bloated (or as incorrect) as some of the other solutions mentioned. – Lee B – 2009-10-25T10:23:44.033
0
sudo apt list package_name
sudo apt search text_to_search_for_in_all_package_fields
0
While both aptitude and apt-cache do the job well, there is a new kid on the block; axi-cache.
axi-cache works a lot like apt-cache, but on steroids. ;) It uses a sophisticated tool called xapian to build an index and then queries that index. It bundles something called http://wiki.debian.org/Debtags>debtags in with the index as well. Debtags allow you to create little tags that stick to deb packages. Suffice it to say that debtags are a powerful way to search for packages and tools to get stuff done.
For example, if you wanted a WebDAV client in Debian you could do this;
axi-cache search protocol::webdav
That search produces this on my machine;
axi-cache search protocol::webdav
14 results found.
Results 1-14:
100% gstreamer0.10-gnomevfs - GStreamer plugin for GnomeVFS
100% sitecopy - A program for managing a WWW site via FTP, DAV or HTTP
100% davfs2 - mount a WebDAV resource as a regular file system
100% blosxom - light, feature-packed weblog app with plugin extensibility
100% lighttpd-mod-webdav - WebDAV module for lighttpd
100% nd - small command line interface to WebDAV servers
100% cadaver - command-line WebDAV client
100% subversion-tools - Assorted tools related to Subversion
100% libapache2-svn - Subversion server modules for Apache
100% libcommons-vfs-java - Java API for accessing various filesystems
100% subversion - Advanced version control system
100% eldav - interface to the WebDAV servers for Emacs.
100% libhttp-dav-perl - WebDAV client library for Perl, and "dave" CLI client
100% fusedav - filesystem to mount WebDAV shares
More terms: webdav servers authoring versioning files subversion remote
More tags: network::client protocol::http role::program implemented-in::c interface::commandline protocol::ftp devel::rcs
As you can see a lot of tools show up which is quite handy if you're not really sure what you are looking for but you know for example the problem area you're looking at.
0
Install aptitude, them it's just aptitude search xyz
for a list of packages with xyz in their name or one-line description.
-1
As root:
apt-get search <package name>
If you didn't know about this, it is usually a good idea to run:
command --help
to see how you can you use the command. that or look at the man pages using
man <command>
@Jonno_FTW:Actually,I heard and used this command the other day.But it gave me too many result.So I have thougth there were any other splendid command... – Jichao – 2009-10-25T08:59:51.207
1you could always pipe it through less - apt-cache search | less – Journeyman Geek – 2009-10-25T09:32:12.140
@Jonno_FTW:tired the apt-get search,shell returns invalid option.tried man apt-get ,could not find search option.googled,found nothing about apt-get.it seems we could not use apt-get search to search for packages! – Jichao – 2009-11-03T12:50:06.763
2+: to search installed packages use 'dpkg -S regex'. – Jichao – 2009-11-04T12:34:28.297