List of packages from certain repo

John L Fjellstad john-ubuntu at fjellstad.org
Wed Dec 20 20:16:43 UTC 2006


Thilo Six <T.Six at gmx.de> writes:

> John L Fjellstad wrote the following on 19.12.2006 05:28:
>> Jeroen van de Nieuwenhof <lists at vandenieuwenhof.nl> writes:
>> 
>>> It's a bit strange that programs like apt aptitude and synaptic can't 
>>> complete a simple task like this.
>> 
>> I'm not sure it's that simple, because the information (AFAIK) is just
>> not there.  Once a package is installed, the system doesn't keep track
>> of where the package came from.
>
> This is wrong, sorry.
>
> $ apt-cache policy nano
> nano:
>   Installiert:1.3.10-1
>   Mögliche Pakete:1.3.10-1
>   Versions-Tabelle:
>  *** 1.3.10-1 0
>         500 http://de.archive.ubuntu.com dapper/main Packages
>         100 /var/lib/dpkg/status
>
> ..and e.g. when disabling this repo in sources.list (for testing
> purpose) in synaptic all packges from there are suddenly amrked as
> installed localy in "status" tab.
>
> So apt keeps track where the packages came from after installing!
>
> But what i do not know how to get a list of packges from a specific repo.
> The above only shows the other way round (show the repo a specific
> package came from).
>
> bye Thilo

No if you look at it, it says the package you have installed has
priority 100.  The same package is available in the
de.archive.ubuntu.com with priority 500.  There is no indication that
those two packages are identical (as in your installed version came from
this particular repository).  Your installed package might have
come from another repository.

Now, some repositories might tag their package version so it
makes it obvious (the backports usually do this), but they don't have
to.

For instance, opera:
liem at minerva:~$ apt-cache policy opera
opera:
  Installed: 9.10-20061214.6
  Candidate: 9.10-20061214.6
  Version table:
 *** 9.10-20061214.6 0
        500 http://deb.opera.com sid/non-free Packages
        100 /var/lib/dpkg/status

I then remove my opera.com repository from my sources.list
liem at minerva:~$ apt-cache policy opera
opera:
  Installed: 9.10-20061214.6
  Candidate: 9.10-20061214.6
  Version table:
 *** 9.10-20061214.6 0
        100 /var/lib/dpkg/status

No indication which repository the opera package came from.  If the
system kept track of which repository the package came from, the
information should still be available even though I removed the
repository from sources.list

-- 
John L. Fjellstad
web: http://www.fjellstad.org/          Quis custodiet ipsos custodes





More information about the ubuntu-users mailing list