Remove duplicate or old applications in “Open with” in Mac Os

Recently I discovered that my “open with” application list had duplicates or even old applications. After searching on the web, I found this command which you need to run in terminal to clean up the list.

All you need to do is open Terminal, copy and paste the command and and run it.

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/\ LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local\ -domain system -domain user