How do you remove the default open with application for a file extension? Not change it but remove it so when I try to open it a popup says "There is no application set to open the document “file.blabla”
.
-
Why would you want to do that?– lhfDec 20, 2018 at 10:45
-
1@lhf because sometimes the application associated with the file is changed to something that was not the default system association and you lose the system associated functionality.– Mike KormendyJan 2, 2020 at 15:51
3 Answers
Use RCDefaultApp. With it, you can set the file association to <disabled>
Another option is to use the command line and lsregister
. lsregister
is located in /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/
To see all the available commands, run /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister
. See this article for more information.
-
1I know that, but I want to be able to remove the association, not change it.– stasApr 3, 2012 at 17:59
-
-
Thanks but would you happen to know how to do this with the command line? If you don't I'll just use the app.– stasApr 3, 2012 at 18:03
-
5/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -u /Applications/Foo.app && killall Finder– ManavMar 24, 2018 at 16:09
-
1I had an app that wasn't in Applications so to find the path to the .app I used /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -apps local -dump | grep AppName Sep 24, 2019 at 2:35
@Manav proposes in a comment a straightforward and non intrusive way which worked perfectly for me, and I think should be an answer. In a terminal window, run:
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -u /Applications/Foo.app && killall Finder
-
1Yes if you want to remove ALL of the associations for an app. But not if you want to choose which extensions to reset that were associated with that app. Jan 2, 2020 at 15:48
All you need to do is right click on the file that you want to open, click "get info" (in the dropdown list) then click "Open with"
After that, select the application you want to open it up with, and select "Change all"
Hope this helps!
-
3