Icons remains the same after I have changed the default program for opening the file I have just uninstalled a program from my new mac. The program was making itself default to open all .r files. I installed a new program, and I maked it default for opening .r files, but the old icon of the files remains. The icon of the old program is stil at every .r-files.

How can I update the icons of the .r-files, so they view the icons of the new program? And why do this icon still exist at my mac, can I remove the icon of the old program?
You can try to rebuild LaunchServices database from Terminal:


  /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Support/lsregister
  -kill -r -domain local -domain system -domain user


Path to lsregister on Mavericks is:


  /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister