Remove Multiple ‘Open With’ Menu Items – Command Line

Command Line Network Configuration
So, I had this annoying situation the other day, when I CTRL Clicked on a file and chose Open With, I was presented with this menu

openwith

Multiple versions of Excel and Word to choose from, probably caused by software updates, anyway, I didn’t like this, it made the menu looked cluttered, so to remove it, you need to open Terminal and enter the following line of code

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

It takes a few seconds to work, but afterwards you should end up with less cluttered menus

newopenwith

You may need to relaunch Finder, which is done by pressing CTRL, ALT and clicking on the Finder icon in the Dock, then click on relaunch