[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Tue, 13 Mar 2007, oldman wrote:

jim tate wrote:
What command could I use to show me duplicate packages of RPM's ,
with different version numbers.
Yum isn't taking out older versions of some packages when updating,
and it causes problem when updating

Hi Jim.

A look through the archives gave me this:

There is a tool available to solve duplicate package problems: see

as well as this:

rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n' | sort

which will sort all your packages with the ones with the most packages
at the bottom
I think it sorts by name and you have to scan the list for dups.

It inspired me to try this, though:

	rpm -qa --qf '%{name}\n' | sort | uniq -d

Prints just the name, sorts the output by name, then prints only duplicated names. As there is no version number, packages installed twice with different version numbers will show up as dups. If you have no problem, you should see:
$ rpm -qa --qf '%{name}\n' | sort | uniq -d

(Maybe not the kernel-devel if you don't build your own modules, maybe kmod-* packages if you use them.)
when you get the list you may be tempted to erase the older package,
but you had best use the --justdb option as deleting an old rpm will
very likely want to erase dependencies as well as the files it has in
common with the newer package. just be sure to 'rpm -e --justdb
I always wondered if you were guaranteed that the only files related to 
that package were from the new version.  You might want to
	rpm -qV <package>

after you do the remove and make sure that the remaining files verify against the new package. That still won't guarantee that there are not files left behind from the old package though.
		Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]
  Powered by Linux