How to add PPA repositories in Debian

About Launchpad PPAs

Important: Many Launchpad PPAs are not supported by Debian, as the packages include Ubuntu-specific dependencies. Other PPAs do work on Debian. So, before continuing, be aware that even with the successful installation of the PPA, it may not be possible to install the packages due to dependency problems.

On Debian 7

add-apt-repository is a script specifically developed for the Ubuntu distribution that allows adding or removing repositories and that automatically imports the public GPG key required to use these repositories.

As of Debian 7 it is possible to use add-apt-repository to add Launchpad PPAs. However, there are a few things to know before using it.

To add a Launchpad PPA in Debian, as in Ubuntu, use the following command:

sudo add-apt-repository ppa: you / ppa

Obviously you have to replace ppa: you / ppa for the PPA you want to add.

However, if a PPA is added in this way, the source file of the PPA will use the current version of Debian (for example, »wheezy»). If we run an apt-get update we will see a 404 error, as there are no packages for Debian Wheezy in the Launchpad PPA repositories. They are all packages built for different versions of Ubuntu. How to solve it? Simple, you have to change the source file of the PPA and indicate the packages of which version of Ubuntu we want to use.

To get it to work correctly, then, after using the command "ppa add-apt-repository ppa: tu / ppa", you have to edit the source file of the PPA that is in the /etc/apt/sources.list folder .d /, and replace the Debian version (eg "wheezy") with an Ubuntu version. At this point, it is advisable to use an LTS version of Ubuntu.

Here is an example. Let's say we add the webupd8team / java ppa in Debian Wheezy using "add-apt-repository: webupd8team / java". As a result, the file /etc/apt/sources.list.d/webupd8team-java-wheezy.list must have been created. We edit it with the following command:

sudo nano /etc/apt/sources.list.d/webupd8team-java-wheezy.list

This file should contain two lines:

deb wheezy main deb-src wheezy main

It only remains to change "wheezy" by the code name of the Ubuntu distribution that we want to use. In this case, for example, we can use Trusty, the latest LTS version of Ubuntu. After editing the file, it should look like this:

deb trusty main deb-src trusty main

Finally, you just have to run:

sudo apt-get update

This will update the list of packages, now taking into account the packages hosted in the newly added PPA repositories.

In older versions of Debian

In older versions of Debian, if the add-apt-repository command is not available, the repository can be added manually by editing the file / Etc / apt / sources.list and adding the key with apt-key.

All of this information can be found on the PPA's Launchpad website, under the section titled "Technical details about this PPA," as seen in the screenshot below:

ppa Webupd8

First we import the key with the apt-key command:

sudo apt-key adv --keyserver --recv-keys EEA14886

Obviously, you have to replace EEA14886 with the key of the PPA you want to add.

Sign key:
1024R / EEA14886 (What is this?)

As you can see, the key to use in the apt-key command is after the forward slash.

Once this is done, add the corresponding deb lines at the end of the /etc/apt/sources.list file.

The trick here is to choose a version of Ubuntu "equivalent" to the version of Debian we are using on the PPA website. This will generate the corresponding http addresses, as seen in the screenshot above.

Once we have the http addresses of the PPA, we can use a text editor or simply run the following from a terminal to add them to the end of the /etc/apt/sources.list file:

echo 'deb deb trusty main' >> /etc/apt/sources.list echo 'deb deb-src java / ubuntu trusty main '>> /etc/apt/sources.list

Finally, we update the package list:

sudo apt-get update

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

14 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   joan said

    Hello good Morning,

    I really don't see any need to use ppa repositories in Debian. I don't recommend mixing Ubuntu packages with Debian at all.

    By the way, the Debian repositories are more than complete.


    1.    let's use linux said

      It is true. It is not ideal but sometimes there is no other. For example, to install Java (Oracle). 🙁
      Hug, Pablo.

  2.   linuXgirl said

    Excellent!!! For the Linux Cheat Trunk !!! 😀

  3.   cholojous said

    Good guide, it reminded me of my rookie days with Debian 6 adding PPA's like crazy and reinstalling. Greetings 🙂

  4.   Nukela said

    to destabilize debian better use ubuntu
    The contribution is good, but not convincing, I prefer to compile if it is not in the debian repos.

    1.    let's use linux said

      It is true. There is also debian testing. Likewise, for those who do not know how to compile the applications, a task that we agree to can sometimes be quite tedious, this can be an alternative. Sure, it's not ideal on paper, but it can work.

  5.   victor miranda said

    It is not necessary to use "apt-repository" in Debian, with "apt edit-sources" you add as a common repository and then with "pubkey" you export the key automatically and update the repositories ...

    1.    let's use linux said

      Sure, that's another way to do it, although it's a bit more complicated. That is why I chose add-apt-repository. Also, those who come from Ubuntu will feel familiar with its use.
      Hug, Pablo.

  6.   sausl said

    I would use the 12.04 ppa since they share kernel version
    I did not install the ppa but downloaded the debs and installed them when using debian

  7.   auroszx said

    A little trick: look in the WebUpd8 PPA for the "launchpad-getkeys" package. Install it, it does not cause problems. Then run that same command as root, and it will take care of adding all the missing PPA signatures, instead of adding them one by one.

  8.   kuis said

    I think posting something that a lot of newbies will try and screw up their Debian, should be more than warned about the mess they can make

    1.    let's use linux said

      It is clearly warned at the beginning of the post. In red and everything ... 🙂

  9.   moony said

    but are you crazy or what? Do you want me to break the debian? ...

    Hehe .. good info, I always saw the PPAs there and I think once or twice I wanted to find out the real address, but I couldn't so I gave it up.
    Thanks and I will NEVER try to use them (maybe with third party PCs if)

    Greetings from the south.

  10.   vicdeveloper said

    Good tuto, followed to the letter and working without problems.