Hi,
I want a list of installed packages by package name only (i.e. no version, release, .rpm, etc.)
How do I do it?
Simple I know, but...
I want to be able to generate two lists of rpms installed to diff so I know what package changes have occurred between one install and another.
Regard, M.
On Thu, 2005-11-03 at 13:13 +1300, Morgan Read wrote:
Hi,
I want a list of installed packages by package name only (i.e. no version, release, .rpm, etc.)
How do I do it?
It's documented in the manpage - use the "--qf" option to format the results as you want them.
Eg.
rpm -qa --qf "%{NAME}\n"
Simple I know, but...
I want to be able to generate two lists of rpms installed to diff so I know what package changes have occurred between one install and another.
Don't you want to know about differences in version too?
Cheers, Ben
--On Thursday, November 03, 2005 11:19 AM +1100 Ben Stringer ben@burbong.com wrote:
It's documented in the manpage - use the "--qf" option to format the results as you want them.
Eg.
rpm -qa --qf "%{NAME}\n"
You'll want to sort the result, as the names are reported in seemingly-random order as they're pulled from the database.
Here's one I used recently:
rpm -qa --queryformat='%{SIZE} %{NAME}\n' | sort -n
The largest packages will group at the end, letting you know what's using most of your disk space. (For me, it was the kernel-source RPM on FC2 that was chewing up 250 MB.)
Kenneth Porter wrote:
--On Thursday, November 03, 2005 11:19 AM +1100 Ben Stringer ben@burbong.com wrote:
It's documented in the manpage - use the "--qf" option to format the results as you want them.
Eg.
rpm -qa --qf "%{NAME}\n"
You'll want to sort the result, as the names are reported in seemingly-random order as they're pulled from the database.
Here's one I used recently:
rpm -qa --queryformat='%{SIZE} %{NAME}\n' | sort -n
The largest packages will group at the end, letting you know what's using most of your disk space. (For me, it was the kernel-source RPM on FC2 that was chewing up 250 MB.)
Thanks, I knew it would be "simple" - I've spent forever trying to workout that queryformat stuff - and the manpage referred to... Regards, M
Ben Stringer wrote: ...
I want to be able to generate two lists of rpms installed to diff so I know what package changes have occurred between one install and another.
Don't you want to know about differences in version too?
... Don't think so - basically I just want to know what to install to get back to where I was before an upgrade (fc4->5, in a few months - a little more systematically than 3->4:) But, may be I do? Open to suggestions? How do I if I do? Regards, M.
On Thu, 2005-11-03 at 22:12 +1300, Morgan Read wrote:
Ben Stringer wrote: ...
I want to be able to generate two lists of rpms installed to diff so I know what package changes have occurred between one install and another.
Don't you want to know about differences in version too?
... Don't think so - basically I just want to know what to install to get back to where I was before an upgrade (fc4->5, in a few months - a little more systematically than 3->4:) But, may be I do? Open to suggestions? How do I if I do?
How I generally tackle this problem is to get a sorted list of rpms (versions and all) on either system, then "diff" them. This will show both packages absent from one system or the other, and packages that are installed on both but at different versions. I'd be guessing that comparing an FC3 and FC4 full install, 80-90% of packages will be common to both, but at different versions.
Going backwards (eg. from FC4 to FC3) is never a trivial exercise though - hard enough to satisfy all those dependencies going forward! If your aim is to be able to get back to a "snapshot" of the operating system at a point in time, just backing up the whole system may be easier than trying to use the RPM system to revert to earlier versions.
Cheers, Ben