Saturday, August 6, 2011

Add and Remove PPA in Ubuntu

With newer versions of Ubuntu (>= 9.10) you can add PPA (Personal Package Archives), a convenient way to get latest versions of software.
To add a ppa:
sudo add-apt-repository ppa:<repository-name>/<sub-directory>
sudo add-apt-repository ppa:ubuntu-wine/ppa
You need to have 'python-software-properties' installed. Usually its installed by default. But it's the dependency, just-in-case.

Remove PPA:
1. Install ppa-purge and purge the ppa repository as shown below:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:<repository-name>/<sub-directory>
eg: ppa-purge ppa:ubuntu-wine/ppa

Adding repository or software channel:
1. First backup the sources.list
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
2. Append the repository links (deb,deb-src) to
deb natty main restricted
deb-src natty main restricted