Over time RPM seems to collect duplicate packages for one reason or another (interrupted installs, hoarding, who knows), causing unpleasantness at update time. Attached is a short script that issues a list of packages which are not only duplicated, but are older (by install date) than the newest duped package (which is not printed). The script itself just prints package versions and does not remove anything.
The issued list is suitable for feeding into rpm -e to give your constipated package database a colonic irrigation, without actually removing any packages. I suggest you review the output against rpm -q packagename and satisfy yourself that the list is looking good before hitting it with rpm -e, but it has worked great on a couple of machines here and I hope it is useful to others bedevilled by the package duplication problem. Please note that although it works fine for me, it might eat your install and burn down your house, try at your own risk.


.
