One of the great advantages that Ubuntu has over other distributions is the large number of applications available for this distribution and the ease of installing and keeping them up to date through PPA repositories thanks to Launchpad.
Unfortunately the order
is only available for Ubuntu, so adding these repositories is not as easy when you want to add to a distribution like Debian or based on that you can usually make use of .deb packages created by Ubuntu.
This is not to say that we cannot make use of these repositories in Debian, as Debian also provides a way to add custom repositories, and then we will learn how to do it.
First of all we need to understand how Debian repositories are handled. Which are hosted in the archive
like all Debian-based distributions, including Ubuntu, and has the following format:
deb http://site.example.com/debian distribución componente1 componente2 componente3 deb-src http://site.example.com/debian distribución componente1 componente2 componente3
The first word in each line (
) Means the type of file in the repository. In the case of
, Means that the file available in the repository is an installable binary file, packaged as
for Debian or distributions based on it. And in the case of
, Means that the repository contains the source code of the application.
The distribution may well be the name of the distribution (Lenny, etch, lenny, sid) or the type of package (Stable, oldstable, testing, unstable).
The components already depend on the distributor of the repository, for example in the case we will use as an example, these are main, multiverse, restricted and universe.
Now that we know how Debian repositories work, let’s learn how we can add a PPA repository to Debian or distributions based on it.
The first thing we need to do is find the PPA repository page on Launchpad. We can usually do this by typing in a search engine like Google the name of the PPA repository.
In this manual, we will use the PPA provided by the stable version of Ubuntu-Tweak, Ppa: tualatrix / ppa.
If we do not find the link to the repository page in the search engine, we can directly enter launchpad.net and in the search engine type the name of the PPA repository.
Following this, we search among the results the page of the repository that interests us reaching the end to the site we are looking for, where we will find all the information we need to properly add the Debian repository.
On the page of the PPA repository we can find a link in green that says «Technical details about this PPA», We click on this link and we will find the technical information on the repository in question, this information is precisely the addresses
which we need to add inside the file
which controls Debian repositories.
Additionally, we can see a drop-down menu with the list of distributions supported by this application. At best, you’ll find the latest version of the app for all distributions, but in some cases, each distribution has a different version of the package, being generally older in older distributions. (Note that this menu automatically changes the setting distribution in the repository to make it easier for you to include in the archive
In these technical details we can also find the number of the public key that we will use to digitally sign the repository. This helps us to verify the validity and security of the repository we are using.
After knowing all this very important information, we get to the part we were all waiting for, first of all, we have to open the /etc/apt/sources.list file to add the new repository. We can do this by running the following line in the terminal as root:
Already with the file open as root, we go to the end of the document and add the repositories for Ubuntu-Tweak (you can add a comment to be clearer where the repository comes from).
# Repositorio de Ubuntu-Tweak por Tualatrix Chou deb http://ppa.launchpad.net/tualatrix/ppa/ubuntu maverick main deb-src http://ppa.launchpad.net/tualatrix/ppa/ubuntu maverick main
With the repository entered in the archive
, We can save and close the document.
At this point we already have the repository in the Debian repository list, but we may have trouble updating this list because Debian may consider the repository unsafe and not download the list of packages it contains.
To avoid this we will install the public key of the repository executing the following command in the terminal where we will include the number indicated like public key in the previous image (0624A220).
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0624A220
If all goes well, we will see a text like the following in our terminal:
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 0624A220 gpg: solicitando clave 0624A220 de hkp servidor keyserver.ubuntu.com gpg: clave 0624A220: «Launchpad PPA for TualatriX» sin cambios gpg: Cantidad total procesada: 1 gpg: sin cambios: 1
If this was the result, we can safely proceed to update the list of repositories and install the application with the following command:
aptitude update && aptitude install ubuntu-tweak
- Note that not all Ubuntu applications will work on Debian or distributions based on it.
- You should carefully choose the version to use in the packages, as these can lead to the breakdown of some dependencies especially in distributions such as stable Debian, which does not always provide the latest versions of packages.