The /etc/rcX.d are startup scripts for a given runlevel of your OS, where X is the runlevel. Since you boot into graphical mode, that usually happens in runlevel 5 on most distros. So in your specific case, the script in /etc/rc5.d/S04dkms was starting the S04dkms program everytime the system booted.
I had you do ls -al /etc/rc5.d/S04dkms because sometimes that is an individual file, and sometimes it is a symbolic link. If it was a file, it would give information like
-rwxr-xr-x 1 root root 2518 2006-09-12 10:44 ifupdown
and if it was a symbolic link, it would look like:
lrwxrwxrwx 1 root root 16 2006-07-16 17:37 S20vsftpd -> ../init.d/vsftpd
The -> symbol shows the file the link is pointing at. By killing the S04dkms file, it won't start. Another method is to turn the S from start into K for kill. Had you not erased the file with the rm command, you could change it to K04dkms, and then it wouldn't start, but might still throw errors. By erasing the S file, you kill the startup link to the executable file, so it doesn't try to start, and doesn't cause errors.
As I mentioned before, I don't use Mandriva, nor any of the other rpm based distros. There is a command to force the uninstallation of an rpm file, and it is probably somedthing like rpm -force-removal or rpm -force-uninstall (filename). If you check the man rpm page, you can find the force removal command, and executing it with the bad name after it shjould clear up the mistake in the tree of installed software. You could also simply install the new version to be installed, which should clear up the old one, or just ignore it, because it isn't a problem. You'd just have to remember that your machine thinks it has the program installed when it doesn't.