How To List Packages From A PPA / Repository In Ubuntu

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?

Synaptic
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

Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.



Category: Ubuntu | Comments Off on How To List Packages From A PPA / Repository In Ubuntu

Speed Up apt-get Downloads With apt-fast [Ubuntu PPA]

Apt-fast is a script that can “drastically improve APT download speed” by using command line download accelerators such as Axel or Aria2 with multiple connections per package.
We’ve actually blogged about apt-fast back in 2009 but since then, the script has received some important changes so I’ve wanted to update our readers with its current status.
Since our previous apt-fast articles, the script has gained support for multiple download tools (axel and aria2), an option to download the binary in the current folder as well as an option to use either apt-get or aptitude. Further more, apt-fast has an official PPA for Ubuntu users and it’s even present in the official repositories for some Linux distributions, like PCLinuxOS for instance.
apt-fast

Features:
uses aria2 or axel, 2 great command line download tools to improve download speed, with multiple connections per package supports both apt-get and aptitudeproxy supportsupports most apt-get functions: install, upgrade, dist-upgrade, build-dep and so on
Don’t expect the script to do wonders for slow Internet connections (though I can’t really comment here since I have a really fast connection), but if you have a decent Internet connection, you should see some pretty big improvements in downloading the binaries. This is especially useful for installing / upgrading multiple or large packages, such as games (hint for 0 AD fans).

apt-fast only speeds up downloading the binaries, so even though ‘apt-fast update’ works, this command isn’t ran using a download accelerator so the speed is the same as with apt-get. Support for the ‘update’ command is, however, planned for a future release. If you can help implement this, see the apt-fast GitHub page.

Install apt-fast
Ubuntu users can install the latest stable apt-fast from its official PPA:
sudo add-apt-repository ppa:apt-fast/stable
sudo apt-get update
sudo apt-get install apt-fast

apt-fast configuration
When installing apt-fast in Ubuntu via its PPA, the package asks you if you want to use aptitude or apt-get, what download manager to use (axel or aria2c). If, later on, you want to change some of the apt-fast options, use the following command:sudo dpkg-reconfigure apt-fast
aria2c is the download tool recommended by the apt-fast developers, mostly because it supports resuming downloads.
For other Linux distributions, you can download apt-fast from GitHub.

Using apt-fast
apt-fast works the same as apt-get and all you have to do is use “sudo apt-fast install PACKAGE” instead of “apt-get” and so on for any operation.
Install a package:
sudo apt-fast install PACKAGE
Upgrade packages:
sudo apt-fast upgrade
Install the build dependencies for a package:
sudo apt-fast build-dep PACKAGE
Like I was saying, the commands are identical to apt-get and all you have to do is replace “apt-get” with “apt-fast”. There’s also a download command (“apt-fast download PACKAGE”) which downloads the binary into the current directory.
If you encounter bugs, report them @ Launchpad or GitHub.

Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.



Category: Ubuntu | Comments Off on Speed Up apt-get Downloads With apt-fast [Ubuntu PPA]