Ade Malsasa Akbar contact
Senior author, Open Source enthusiast.
Monday, January 23, 2017 at 22:21


This beginner's guide Part 4 explains PPA and Third-Party Repository in Ubuntu. For your information, Ubuntu community is very huge, so there are many third-party repos available providing many software packages not available in Ubuntu official repos. There are 2 PPA examples to be used here, for GIMP and Inkscape, to show how to add the addresses and install the software packages. The aim of this Part 4 is for you to be able to add any PPA address and install software packages from PPA. This guide is a continuation of Part 3 Sources.list. I hope this part helpful for everyone.
Subscribe to UbuntuBuzz Telegram Channel https://telegram.me/ubuntubuzz to get article updates directly.


1) What Is Repository?



2) What Is Third-Party Repository?


Third-party repository is a term to mention “unofficial repository”. It means the software packages stored inside this repo are not available in the official repo; or the repo is created by any party outside the official Ubuntu Developer Team.


3) What Is PPA?


Personal Package Archive (PPA) is a kind of third-party repository to store software packages for Ubuntu users. PPA service is a part of Launchpad, thus a service of Canonical, the company behind Ubuntu. The main purpose of a PPA is to deliver software directly to the users without entering the official repository before. Every PPA has an address and this address can be added to sources.list in your Ubuntu system. APT will read the address and install the software packages from PPA for you (so again, a PPA is just a repository). This term PPA for Ubuntu is more or less synonymous with AUR for Arch Linux or COPR for Fedora or SBO for Slackware. Read more about PPA in Launchpad Help https://help.launchpad.net/Packaging/PPA.


4) Do You Need PPA?


Yes, you will need PPA for many popular software applications that are not available in Ubuntu official repository. There are two possible reasons you need PPA: either it is software version, or software availability. First condition: sometimes certain software available in both PPA and official repo (with the PPA one’s are newer, so it’s software version); second condition: a lot of certain software available only in PPA and not in official repo (it’s software availability).

For example, there are PPA providing very latest version of Scribus, GIMP, Inkscape, Blender, Krita, MyPaint, FreeCAD, and so on. Many users install those software from PPA instead because the official repo versions are considerably old.


5) Maintain PPA Addresses


To maintain PPA addresses in an Ubuntu system, every Ubuntu user has two choices: using GUI and using console. You can use the GUI program named “Software & Updates” in your menu, or run the command $ software-properties-gtk . The rest of this article does not explain the GUI method, instead, it explains the console method.

Using GUI:


Using console:


4) Find A PPA


Look at Launchpad (https://launchpad.net) or search through search engines. The majority of PPA for Ubuntu are available in Launchpad. If you don’t have time searching, I have collected many PPA addresses for popular software applications for Ubuntu:


5) Add A PPA Address as Sources.list


Generally, to add a PPA address in Ubuntu system, you edit the sources.list. Then you should run apt-get update command. This apt-get update is needed in order to download the “repository map” of that PPA repository so APT can download packages from it. This article uses 2 PPAs as example, GIMP PPA and Inkscape PPA, to show how to add a PPA address. Both PPA provides software packages for Ubuntu 14.04, 16.04, until 16.10.


6) Add PPA Manually


Edit /etc/apt/sources.list file manually by placing the PPA address correctly. I use Gedit text editor again to demonstrate it. See following steps:

For GIMP PPA:

  1. Look for “Technical details about this PPA” link, click that link, you must see a box appears showing two lines of sources.list.
  2. Click “Choose your Ubuntu version button” and select your Ubuntu version from there. This will change the two lines automatically to suit your selected Ubuntu version.
  3. Copy the two lines of source code there.
  4. $ sudo gedit /etc/apt/sources.list
  5. Paste the two lines you copied into a new blank line at the most bottom.
  6. Save the sources.list file.
  7. $ sudo apt-get update

For Inkscape PPA:

  1. Do point 2 until 8 like the GIMP PPA above.

Screenshot:



7) Add PPA via Special Command


The most common and easiest way to add PPA address is using add-apt-repository command line. This command will automatically add a special .list file to /etc/apt/sources.list.d/ directory for each PPA. In other words, this command doesn’t touch the main sources.list to add PPA. To demonstrate it, I show here the 2 examples again.

For GIMP PPA:

  1. Look for one address code “ppa:packager_name/ppa_name” and for this case it is ppa:otto-kesselgulasch/gimp-edge.
  2. Copy that PPA address code.
  3. $ sudo add-apt-repository ppa:otto-kesselgulasch/gimp-edge
  4. Terminal will ask for your permission. Press Enter to go next, or press Ctrl+C to cancel.
  5. $ sudo apt-get update

For Inkscape PPA:

  1. Look for one address code “ppa:packager_name/ppa_name” and for this case it is ppa:inkscape.dev/stable.
  2. Do point 3 until 6 like GIMP PPA above. 
      
Screenshot:


 

8) Install Software from PPA


This is the purpose of using a PPA repository. To install software package from PPA, simply run apt-get install command with the <package_name> of the software available in that PPA. Regarding the 2 examples mentioned, so the command lines are:

Synopsis:

$ sudo apt-get install <package_name>

GIMP from PPA:

$ sudo apt-get install gimp

Inkscape from PPA:

$ sudo apt-get install inkscape

 

9) Comparing Package Versions


Once you add a PPA address and obtain its “repository map”, you can see the both version of same software packages both in PPA and official repo. Use apt-cache command to do it like this.

Synopsis:

$ apt-cache policy <package_name>

GIMP versions:

$ apt-cache policy gimp

Inkscape version:

$ apt-cache policy inkscape

Output for GIMP:



Output for Inkscape:



Explanation:

  • For GIMP: you see that there are two versions, version 2.9.5 from PPA and version 2.8.18 from official repo.
  • For Inkscape: you see that there are two versions, version 0.92 from PPA and version 0.91 from official repo.

10) Remove PPA Address Automatically


This method is easier for beginner. To remove a PPA address (only the address, not the software) from your sources.list system, use add-apt-repository command again. Remember that you need to run apt-get update once you change any sources.list setting. I show you for the 2 examples above.

For GIMP:

$ sudo add-apt-repository --remove ppa:otto-kesselgulasch/gimp
$ sudo apt-get update

For Inkscape:

$ sudo add-apt-repository --remove ppa:inkscape.dev/stable
$ sudo apt-get update

Explanation:

The command above will delete the PPA address. However, that command does not delete its *.list file. You may check /etc/apt/sources.list.d/ directory for the file.

11) Remove PPA Address Manually


This method is needed when you experience some trouble. To remove PPA address manually, if you added it manually too, then you just need to delete its lines in sources.list. But to remove PPA address manually if you added it automatically (via add-apt-repository), then you should know the files and delete them manually.

Method 1:

  • $ sudo gedit /etc/apt/sources.list
  • Look for your PPA address line there, such as gimp-edge or inkscape-stable.
  • Delete that lines.
  • Save sources.list file.
  • $ sudo apt-get update

Method 2:

  • Look at /etc/apt/sources.list.d/ directory.
  • Look for any .list file named with your PPA address name, such as gimp-edge or inkscape-stable.
  • Assume the PPA address file name is “gimp-edge.list” then the delete command is:
  • $ sudo rm /etc/apt/sources.list.d/gimp-edge.list*
  • Then perform a reload:
  • $ sudo apt-get update

11) Remove Software Packages from PPA


To remove software package installed from PPA, use apt-get remove normally. There are 2 examples:

For GIMP:

$ sudo apt-get remove gimp

For Inkscape:

$ sudo apt-get remove inskcape

Note:

Remember that deleting the package is not the same as deleting the PPA address. After removing the package, if you install the same package again next time, your system will choose the PPA version not the official repository version. For that reason, you may delete the PPA address either so next time APT will install package from official repository.

Additional Information


Once you use Ubuntu you use free software and live in free software community. One of the meaning of being free is everyone in whole community has the right to distribute software. So it means there are still many third-party repositories available for Ubuntu outside Launchpad. One of the biggest of them is openSUSE OpenBuildService https://build.opensuse.org.

References