Re: Duplicate Packages

[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
.
Jim

Hi Jim.

A look through the archives gave me this:

There is a tool available to solve duplicate package problems: see
https://lists.dulug.duke.edu/pipermail/yum/2006-December/009451.html

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
gpg-pubkey
kernel
kernel-devel

(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
package-1<older.pkg.version>

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
http://www.math.clemson.edu/~mjs

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux