Michael Cordell's Blog

Determine the source of a package

#

In order to determine the source of a package:

apt-cache policy {package name}

e.g:

apt-cache policy xbmc
xbmc:
  Installed: 2:11.0~git20120321.14feb09-0ubuntu1~ppa1~lucid
  Candidate: 2:11.0~git20120321.14feb09-0ubuntu1~ppa1~lucid
  Version table:
 *** 2:11.0~git20120321.14feb09-0ubuntu1~ppa1~lucid 0
        500 http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/ lucid/main Packages
        100 /var/lib/dpkg/status
     2:10.1~ppa1~lucid 0
        500 http://ppa.launchpad.net/team-iquik/xbmc-stable/ubuntu/ lucid/main Packages
        500 http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/ lucid/main Packages

Determine installed PPAs:

xbmc@XBMCLive:~$ ls -l /etc/apt/sources.list.d/
-rw-r--r-- 1 root root 140 2012-07-24 01:12 audiodev.list.list
-rw-r--r-- 1 root root 140 2012-07-24 01:12 audiodev.list.list.save
-rw-r--r-- 1 root root  63 2012-07-24 01:12 lucid-bleed-ppa-lucid.list
-rw-r--r-- 1 root root  70 2012-07-24 01:12 team-iquik-xbmc-stable-lucid.list
-rw-r--r-- 1 root root  70 2012-07-24 01:12 team-iquik-xbmc-stable-lucid.list.save
-rw-r--r-- 1 root root  61 2012-07-24 01:12 team-xbmc-ppa-lucid.list
-rw-r--r-- 1 root root  61 2012-07-24 01:12 team-xbmc-ppa-lucid.list.save
-rw-r--r-- 1 root root 180 2012-07-24 01:12 ubuntu.list.list
-rw-r--r-- 1 root root 180 2012-07-24 01:12 ubuntu.list.list.save
-rw-r--r-- 1 root root 128 2012-07-24 01:12 xbmc.list.list
-rw-r--r-- 1 root root 128 2012-07-24 01:12 xbmc.list.list.save
-rw-r--r-- 1 root root 140 2012-07-24 01:12 xbmc-svn.list.list
-rw-r--r-- 1 root root 140 2012-07-24 01:12 xbmc-svn.list.list.save

XBMC has two repos providing the same package. When

sudo apt-get update

it complains:

W: Duplicate sources.list entry http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/ lucid/main
Packages (/var/lib/apt/lists/ppa.launchpad.net_team-xbmc_ppa_ubuntu_dists_lucid_main_binary-i386_Packages)

Let’s clean up the duplicate packages with ppa-purge. First install ppa-purge:

sudo apt-get install ppa-purge python-software-properties pkg-config

Now purge the bad package:

xbmc@XBMCLive:~$ sudo ppa-purge ppa:team-iquik/xbmc-stable
PPA to be removed: team-iquik xbmc-stable
Package revert list generated:
 librtmp0/lucid xbmc/lucid xbmc-bin/lucid xbmc-data/lucid xbmc-live/lucid
xbmc-ppa-keyring/lucid xbmc-skin-confluence/lucid xbmc-standalone/lucid

Disabling team-iquik PPA from
/etc/apt/sources.list.d/team-iquik-xbmc-stable-lucid.list
Running apt-get update
W: Duplicate sources.list entry http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/ lucid/main Packages (/var/lib/apt/lists/ppa.launchpad.net_team-xbmc_ppa_ubuntu_dists_lucid_main_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version 2.4~20110711.gitc28f1bab-1ubuntu0~ppa4~lucid (XBMC PPA:10.04/lucid) for librtmp0
librtmp0 is already the newest version.
librtmp0 set to manually installed.
Selected version 2:11.0~git20120321.14feb09-0ubuntu1~ppa1~lucid (XBMC PPA:10.04/lucid) for xbmc
xbmc is already the newest version.
Selected version 2:11.0~git20120321.14feb09-0ubuntu1~ppa1~lucid (XBMC PPA:10.04/lucid) for xbmc-bin
xbmc-bin is already the newest version.
xbmc-bin set to manually installed.
Selected version 2:11.0~git20120321.14feb09-0ubuntu1~ppa1~lucid (XBMC PPA:10.04/lucid) for xbmc-data
xbmc-data is already the newest version.
xbmc-data set to manually installed.
Selected version 2:11.0~git20120321.14feb09-0ubuntu1~ppa1~lucid (XBMC PPA:10.04/lucid) for xbmc-live
xbmc-live is already the newest version.
Selected version 2009.06.03 (XBMC PPA:10.04/lucid) for xbmc-ppa-keyring
xbmc-ppa-keyring is already the newest version.
Selected version 2:11.0~git20120321.14feb09-0ubuntu1~ppa1~lucid (XBMC PPA:10.04/lucid) for xbmc-skin-confluence
xbmc-skin-confluence is already the newest version.
xbmc-skin-confluence set to manually installed.
Selected version 2:11.0~git20120321.14feb09-0ubuntu1~ppa1~lucid (XBMC PPA:10.04/lucid) for xbmc-standalone
xbmc-standalone is already the newest version.
xbmc-standalone set to manually installed.
PPA purged successfully