Tom London wrote:
On 7/16/06, Erwin Rol <mailinglists(a)erwinrol.com> wrote:
> On Sun, 2006-07-16 at 18:47 +0200, Erwin Rol wrote:
> Another problem now is that a lot of rpm's are now double installed and
> somehow this prevents dependency checking of yum from working as it
> seems to only see the first package, for example i get the following
> error;
>
> Error: Missing Dependency: gnome-python2-desktop = 2.15.3-4 is needed by
> package gnome-python2-nautilus-cd-burner
>
> rpm -q gnome-python2-nautilus-cd-burner shows;
> gnome-python2-nautilus-cd-burner-2.15.3-4
> gnome-python2-nautilus-cd-burner-2.15.4-1
>
> And this happens for loads of packages. I am now trying to remove the
> double ones one by one.
>
> Is there anyway to clean up this mess in a more automated way ? Cause i
> do not hope i have to remove over 1000 RPMS one by one.
>
> - Erwin
>
I use the following bash alias to produce a list of all the duplicate
packages:
alias rpmDups='rpm -q `rpm -qa --qf "%{NAME}\n" | sort | uniq -d`'
'rpmDups >dupFiles' puts them all in a file. I would CAREFULLY review
and edit out the ones you want to keep (e.g., the newest versions,
kernel and kernel-devel packages, etc.).
WARNING: Be very careful not to remove something you need....
tom
Better try this attached script I've especially created for situations
like this, run it with its output redirected to a file then do:
rpm -e `cat file`
In between you might want to review the list, but I've had no problems
with it only bug is that with 2 packages versioned like this:
name-1.1-9 name-1.1-10
it adds the name-1.1-10 to the list of packages to be uninstalled
instead of the old one, this does no harm and the next yum update will
fix it.
Regards,
Hans