add-apt-repository command in ubuntu 12.10 - Quantal

09 Nov 2012
Posted by stylesen

add-apt-repository is a command which allows us to add a new repository link to the apt sources ie., /etc/apt/sources.lst file. This is very handy in order to add PPA archives. The advantage of using this command is, it will automatically import the gpg public key of the repository and registers it.

In Ubuntu version 12.10 ie., Quantal this command is not part of 'python-software-properties' package, like the previous ubuntu versions, but available in 'software-properties-common'. In order to install add-apt-repository in 12.10, we must install the package 'software-properties-common' as follows:

$ sudo aptitude install software-properties-common

To find in which package the command we are looking for exists the following will be of help:

$ sudo apt-file update

$ sudo apt-file search add-apt-repository

NOTE: The above commands assume 'apt-file' is already installed in your system.