[Centos] Knowing what packages come from where in apt/yum

Tue Feb 22 01:19:15 UTC 2005
Anne Possoz <anne.possoz at epfl.ch>

Karanbir Singh wrote:
> try this command : ( all on one line )
> 
> for f in `rpm -qa` ; do  echo -n $f ; rpm --qf " %{VENDOR} 
> %{DISTRIBUTION} \n" -q $f ; done
> 
> this should tell you where the packages installed on your machine came 
> from.

I use 2 nice commands:

bin/rpm-q.dates (which sort rpms by installation time) :

rpm -qa --queryformat "%{installtime} %{name}-%{version}-%{release}.%-10{arch} %{installtime:date}\n"|sort -n|sed -e 's/^[^ ]* //'

(less usefull now that /var/log/yum.log is available but easiest to read,
for me at least)

bin/rpm-q.dates.vendor (which list rpm by "vendor" name) :

rpm -qa --queryformat "%-15{vendor} %{name}-%{version}-%{release}.%-10{arch}. %{installtime:date}\n"|sort -n

					Anne