tar cvzf rpmdb-backup.tar.gz /var/lib/rpm
rpm -qa | sort
The first line is to backup your database
The second to remove locks
The third to rebuild your database
The fourth to check if all is ok
Found on the web. You can adapt the url with one grabbed from Oracle JDK download page. What I love here is the fact is send Oracle licence ...