Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have successfully installed some packages using the command line 'sudo apt-get install ...' when I have known in advance that those packages are available. But how can I search for or get a list of what is available in the repositories?

share|improve this question
postgres 9.3 ubuntu – s.d Sep 22 '15 at 12:06
up vote 262 down vote accepted

To search for a particular package by name or description:

From the command-line, use:

apt-cache search keyword

where the search keyword can be all or part of a package name or any words used in its description.

For example, apt-cache search proxy includes both these packages:

tinyproxy - A lightweight, non-caching, optionally anonymizing HTTP proxy
tircd - ircd proxy to the twitter API

Note: the list may be long, so you can pipe the output to less to make it scrollable one line or one screen at a time, i.e. apt-cache search something | less.

To get a list of ALL packages

apt-cache search .

Use Synaptic if you have X-forwarding enabled or are on a desktop

Synaptic is often a more convenient way to do this, but requires at least an X server on your end (unless you're running a desktop environment). Install with sudo apt-get synaptic if necessary.

  • Synaptic on ssh'd server via X forwarding:

    enter image description here

  • Synaptic running locally on Ubuntu Desktop:

    enter image description here

share|improve this answer
A really full and useful answer - thank you – Mark Thomas Jul 7 '12 at 21:30
@MarkThomas Try apt-cache policy too, it gives you more information about the sources. – yclian Mar 21 '15 at 2:44
like apt-get, you can just run apt-cache without any arguments and get the short help/cheatsheet info. You can always read the manpages on it for longer help. (i.e. man apt-cache ) – pd12 Oct 28 '15 at 1:08

You can also use aptitude from the command line:

sudo aptitude search xxxxx
share|improve this answer
The annoying thing about this one is that Ubuntu doesn't seem to give it to you by default. Up until I learnt about apt-cache, I was always having do so apt-get install aptitude on each new box I installed. However, since I can't find a way to get apt-cache to show me whether it's installed, I guess I'll have to keep doing that for a bit :-) – paxdiablo May 5 at 6:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.