How to find which PPA contains a specific package?

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.


Solution 1:

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

Solution 2:

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.