Ubuntu / Linux news and application reviews.

A few weeks ago, we saw how to find out to which PPA / repository a package belongs to in Ubuntu / Debian. But how about getting a list of packages available in a PPA / repository?


To get a list of packages available in a PPA / repository enabled on your system (if the repository is disabled or not added on your system, it won't show up here), firstly install Synaptic if you haven't already:

sudo apt-get install synaptic

(or install Synaptic GTK3)

Then open Synaptic, select "Origin" on the bottom left, then select a PPA or repository on the left and it should list all packages in that PPA / repository for your Ubuntu version, both installed and not installed:

Synaptic origin

In the latest Synaptic built with GTK3, there are two entries for each PPA here, one that uses "/now" at the end, which displays the packages you've installed from a repository and another one which displays all the packages available in that repository.

Important: if the exact same package (including the package version) exists in two or more PPAs / repositories, it will only be listed for one repository entry in Synaptic. That's why I've added other ways of doing this (see below), which list all the packages, even if the package exists in other PPAs / repositories.

Command line

You can also do this using a command like the one below, but this will only list the package names, without any additional info (no version, description, etc.):
awk '$1 == "Package:" { if (a[$2]++ == 0) print $2; }' /var/lib/apt/lists/*PPA-FIRST-PART*PPA-SECOND-PART*Packages

where "PPA-FIRST-PART" is the first part of a PPA, e.g. for the ppa:nilarimogard/webupd8 PPA, "PPA-FIRST-PART" is "nilarimogard" and "PPA-SECOND-PART" is "webupd8".

Let's try it out:
awk '$1 == "Package:" { if (a[$2]++ == 0) print $2; }' /var/lib/apt/lists/*nilarimogard*webupd8*Packages

And here's the terminal output:

list packages ppa terminal

(I've tweaked the original command - see the credits -, to remove duplicate lines which would occur on 64bit systems with multi-arch support).

This works for regular repositories too, e.g. to see all the packages available in the proposed repository:
awk '$1 == "Package:" { if (a[$2]++ == 0) print $2; }' /var/lib/apt/lists/*proposed*Packages

Or, to see the packages available in the security multiverse repository:
awk '$1 == "Package:" { if (a[$2]++ == 0) print $2; }' /var/lib/apt/lists/*security*multiverse*Packages

Using Y PPA Manager

Y PPA Manager, a small application I've created, can list all the packages available in each PPA added on your system. It doesn't work with regular repositories (just Launchpad PPAs) though and the PPA needs to be enabled on your system for this to work. So it's not perfect.

But there are advantages over Synaptic / the command above:
  • unlike Synaptic, it lists all the packages in a PPA, even if the exact same package (exact version) is available in multiple PPAs;
  • unlike the command above, Y PPA Manager displays the package version next to the package name.

List packages PPA Y PPA Manager

To lists all the packages in a PPA, install Y PPA Manager:
sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager

Then launch Y PPA Manager, double click "Manage PPAs", select the PPA and click "List packages".

some info via AskUbuntu & UsemosLinux