Mailinglist Archive: opensuse (1047 mails)

< Previous Next >
Re: [opensuse] command to check all packages
On 2016-01-20 07:49, George Olson (SUSE list) wrote:
Is there a command that I can use to check all installed packages on my
system to see if any are installed from a particular repository?

I sometimes use this:

rpm -q -a --queryformat "%{INSTALLTIME};%{INSTALLTIME:day}; \
%{BUILDTIME:day}; %{NAME};%{VERSION}-%-7{RELEASE};%{arch}; \
| sort | cut --fields="2-" --delimiter=\; \
| tee rpmlist.csv | less -S


rpm -q -a --queryformat "%{INSTALLTIME}\t%{INSTALLTIME:day} \
%{BUILDTIME:day} %-30{NAME}\t%15{VERSION}-%-7{RELEASE}\t%{arch} \
| sort | cut --fields="2-" | tee rpmlist | less -S

You get a list sorted by install date of all packages. One of the
columns is the vendor, another the distributor. There is no field stored
in the database corresponding to repository, so it can not be printed.
But they can be identified from the available info. You can adjust the
queries to sort on other fields.

Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 "Bottle" at Telcontar)

< Previous Next >