Skip to content

Instantly share code, notes, and snippets.

@pfigue
Created February 9, 2015 14:39
Show Gist options
  • Save pfigue/98d45aed584a8f6f1c8f to your computer and use it in GitHub Desktop.
Save pfigue/98d45aed584a8f6f1c8f to your computer and use it in GitHub Desktop.
Ubuntu PPA cheatsheet

Ubuntu PPA cheatsheet

Installing a new PPA

With this command:

sudo add-apt-repository ppa:<ppa_name>

which needs an extra software package:

  • On Ubuntu >=14.04: sudo apt-get install software-properties-common
  • On Ubuntu <=12.04: sudo apt-get install python-software-properties
  • On the rest, you have to discover.

Listing currently installed PPAs

Debian APT info is stored in /etc/apt/sources.list and /etc/apt/sources.list.d/:

$ ls -lah /etc/apt/sources.list.d/
total 32K
drwxr-xr-x 2 root root 4.0K Feb  9 13:27 .
drwxr-xr-x 6 root root 4.0K Feb  9 13:27 ..
-rw-r--r-- 1 root root  100 Feb  9 13:27 nodesource.list
-rw-r--r-- 1 root root   66 Feb  9 13:08 ppa_chris_lea_node_js_trusty.list
-rw-r--r-- 1 root root   84 Feb  9 13:08 ppa_leonard_ehrenfried_apt_transport_s3_trusty.list
-rw-r--r-- 1 root root   61 Feb  9 13:08 ppa_nginx_stable_trusty.list
-rw-r--r-- 1 root root   45 Feb  9 13:08 repos_sensuapp_org_apt.list
-rw-r--r-- 1 root root  257 Feb  9 13:08 s3_eu_west_1_amazonaws_com_relayr_apt.list
$ less /etc/apt/sources.list

Maybe there is a way of doing this nicer, but I don't know it atm.

Removing a PPA

Either with:

sudo add-apt-repository --remove ppa:whatever/ppa

Or alternatively, after installing the ppa-purge tool (sudo apt-get install ppa-purge), with:

sudo ppa-purge ppa_name

If supported by the official distribution this will downgrade packages. If not, this will not remove them.[1]

References:

  1. How can PPAs be removed?
  2. What is PPA?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment