Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

It is not unusual for an Ubuntu (or other distro with apt package management) user to encounter the error:

user@box ~ $ sudo apt-get install x
[sudo] password for user: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package x is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'x' has no installation candidate

There have been several questions asked concerning this on various StackExchange sites,for example openvpn on AskUbuntu, but these are generally about how to obtain the specific package despite the error.

I have found no package that is not found simply (though not always easily) by determining if it is still distributed, and under which repository if so, and ensuring that repository is in apt.sources, or the worst comes to the worst downloading a .deb or source to compile.

So my question is more general, and although I am guessing it has a rather simple and therefore non-exciting answer I cannot think how to find it by conventional search engine methods, so I turn to AskUbuntu: Is there a command or option I can use to determine what package / which packages reference the missing package?

share|improve this question
up vote 1 down vote accepted

You can search for the package with apt-cache:

apt-cache search x

This will output all packages that in a way or another make a reference to x.

share|improve this answer

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.