Packages, searching

From Ubuntuwiki.net

Jump to: navigation, search

Fear not: the repositories are searchable for relevant stuff without having to resort to webpages or GUI applications like synaptic.

you@box:~$ apt-cache search browser

... will search for any ports that have anything to do with the key word "browser". Of course, that's a LOT of different packages, and a lot of info you probably don't care anything about - so you can always experiment with refinements. For example, unfortunately you can't directly search only for packages which contain "browser" in the description... but you can use grep to filter the results for you, so that you only see those:

you@box:~$ apt-cache search browser | grep -E "^\S*browser\S*\ -"

Much better - that cut the results down from well over 500 to only 34. What if you want to see more information about a particular one of those packages?

you@box:~$ apt-cache show epiphany-browser

That will get you a whole lot of information about the package in question; not only a longer description, but also a version name, dependency and conflict information, and all sorts of other stuff.

Don't forget that apt-cache searches the local repository index, not the repositories themselves - so if you don't apt-get update first, you may get out-of-date information when you search.

Personal tools