Discovering Uninstalled Alternatives for /etc/alternatives
Smylers at stripey.com
Thu Sep 1 10:36:05 UTC 2011
Ric Moore writes:
> > > On Wed, 2011-08-24 at 10:55 +0100, Smylers wrote:
> > >
> > > > How do I find out which packages provide an alternative for a
> > > > particular entry in /etc/alternatives?
> > > >
> > > > For example, I recently spotted that the mutt command uses the
> > > > alternatives mechanism. So I wanted to know which other packages
> > > > provide a mutt command -- maybe one of those would have something
> > > > interesting in that I'd prefer to the Mutt I'm currently using.
> > > >
> > > > update-alternatives only lists alternatives that I already have
> > > > installed.
> > > >
> > > > What I want is a list of all packages that provide a particular
> > > > alternative, so that I can consider installing them.
> galternatives ... will deal with what you already have installed.
> There is nothing out there that will tell you what will potentially do
> whatever to alternatives, shy of magic beans, that >I< know of. If
> such a beast existed, it would be the closest thing to computer
> clairvoyance since Edgar Cayce. <chuckles> I doubt even one of my
> computer voodoo chicken feet would help.
The command-not-found command with its --ignore-installed flag will
return the same output it would as if a command name had been typed and
none of the alternatives were currently installed, thereby listing all
of them. Which is exactly what I wanted.
$ /usr/lib/command-not-found --ignore-installed mutt
The program 'mutt' can be found in the following packages:
Try: sudo apt-get install <selected package>
> But, if I am wrong, it won't be the first time!
Watch fiendish TV quiz 'Only Connect' (some questions by me)
Mondays at 20:30 on BBC4, or iPlayer: http://www.bbc.co.uk/onlyconnect
More information about the ubuntu-users