14

I would like to know which repository contains a specific package, in order to add the PPA link to the sources.list file.

The package can also be outside of the official repositories (multiverse or similar).

I dont want to find only the repository name but also the full qualified PPA link name to be added to the sources without any additional struggle.

muru
  • 197,895
  • 55
  • 485
  • 740
mattobob
  • 243
  • 2
  • 7

2 Answers2

11

y-ppa-manager can do that for you:

sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager

Search the package and use the button Add selected PPA to add the PPA.

enter image description here

enter image description here

enter image description here

A.B.
  • 90,397
  • the y-ppa-manager can not find libraw5 or libraw – Abdul Al Hazred Sep 09 '15 at 13:27
  • @AbdulAlHazred Sure, there is no package with that name for your Ubuntu version. – A.B. Sep 09 '15 at 13:30
  • the program only searches for packages which are available for the system it is installed ? So, same programm on different ubuntu versions can display different results ? Maybe you know if I need to have libraw5 in order to install lightzone or if i do not need any further package or already have another version that fulfills the purpose otherwise libraw5 would have done for another system . .. – Abdul Al Hazred Sep 09 '15 at 13:35
  • @AbdulAlHazred Edit your originally question and add your Ubuntu version and that you need to install lightzone. – A.B. Sep 09 '15 at 13:36
  • 2
    is there a command line utility that do the same ? I hate UI .. i just want to be able to search for something and if found in PPA to add the PPA automatically and then install the thing I was searching for with apt-get – JOKe Jun 20 '16 at 13:33
  • this is always a pain point for me when using Ubuntu (I'm more on Arch these days). Glad to see a solution, but is there a command-line version, too? I really miss yaourt a lot which does exactly that in Arch/Manjaro. – Gregor Feb 09 '17 at 11:18
9

The fastest way to find the repository in which a package was published, is to search the ubuntu package database. For the package aac-enc we will find the following among entries for different releases:

http://packages.ubuntu.com/search?keywords=aac-enc
  • trusty (14.04LTS) (sound): Fraunhofer FDK AAC Codec Library - frontend binary [multiverse]
    0.1.2-1: amd64 i386

The repository will be printed bold in square brackets ([multiverse]).


A personal package archive (PPA) is something different, as it allows everybody to upload any package there. Therefore there is an inherent risk to install packages with issues.

Searching for a PPA can be done from launchpad:

https://launchpad.net/ubuntu/+search?text=aac-enc

will tell us that the package aac-enc is part of the package fdk-aac. On clicking on that we will be directed to a download page for different releases. Further down there is a link to versions in untrusted archives:

enter image description here

This links to an unsorted list of personal package archives containing fdk-aac but we can not limit this search to a defined release.

Takkat
  • 142,284
  • Nice, how to get from here the FULL qualified ppa link? – mattobob Jun 22 '15 at 12:21
  • @mattobob Multiverse is already part of Ubuntu, you just need to enable it in your software sources. – Robobenklein Jun 22 '15 at 12:40
  • Hey bro the question was specific for reporitories which are OUTSIDE multiverse. – mattobob Jun 22 '15 at 12:43
  • There is no link to a PPA from packages.ubuntu - see edit. – Takkat Jun 22 '15 at 12:51
  • I searched on launchpad.net for libraw5 and libraw, the package was found, but i can not find on those sites the launch-pad-username and ppa-name which are both necessary to know in order to add the PPA in the shell by typing add-apt-repository ppa:launchpadusername/ppa-name. HOw to obtain them there ? – Abdul Al Hazred Sep 09 '15 at 13:31
  • 2
    @AbdulAlHazred: In the PPA description there are instructions on how to add it to your system, including the name you should enter (ppa:philip5/extra). – Takkat Sep 09 '15 at 13:37