4

How do I disable Safari in OS X?

The desired effect is the same as in iOS: in iOS, you can easily disable Safari through the Restrictions settings, and the app just hides but is not uninstalled. You cannot search for the app, see an icon, or open it in any way.

I do not want to disable all browsers. In fact, that's the problem. The Parental Controls control all web things. And that's great. But if I want the default browser to be Google Chrome and I want to use a whitelist, then I can't use Parental Controls (at least since Yosemite). The Parental Controls option for a whitelist has been blocking everything from Chrome. Firefox has similar problems, but not as bad as with Chrome. If I use Chrome and Chrome's parental controls, then a user can just open Safari with no restrictions.

  • Why? You've tagged "children": do you not want ANY browser enabled? If so, you might make a proxy that leads all web pages to 127.0.0.1 This might have unintended consequences for other quasi-browser related activity, such as other apps that leverage Safari's HTML/CSS rendering, which may include Mail.app, etc.. – Charles Lindsay Apr 23 '15 at 18:11
  • @CharlesLindsay I updated the question to clarify. – Joseph Hansen Apr 23 '15 at 18:15
  • As of OS X 10.11, you must disable SIP in order to do any of the solutions below. – Joseph Hansen Nov 06 '15 at 22:08

2 Answers2

6

You could change permissions for Safari.

Open the information window on Safari (from the Finder window, with the Safari application selected, push command+I or right-click), add the desired user, and set permissions to no access.

  • +1 This is probably a better idea because if you ever deleted Safari and needed to restore it without making a backup or deleting it caused unintended system problems, the only way to get it back would be to reinstall OS X. – ajkblue Apr 24 '15 at 02:55
  • Trying to find the "information window". command+i does nothing on the account I'm trying to set this up on. I might be doing it wrong, or it might not work from the controlled account, only from admin. I'll keep trying and bring back updates. – Joseph Hansen Apr 24 '15 at 04:21
  • I cannot for the life of me find an "information window on safari". Can you give more information about that? – Joseph Hansen Apr 24 '15 at 04:44
  • Go to the applications folder in finder, mark Safari and then hit cmd + i or right-click for information – Kevin Grabher Apr 24 '15 at 04:52
  • 1
    Worked great. One note: when I added the user, I couldn't choose "No access", even if I was logged into the admin user when I tried to add the controlled user. However, it worked fine to leave the user off and mark "No access" for the "everyone" group. (All accounts use Chrome by default, so no big deal.) – Joseph Hansen Apr 24 '15 at 19:22
  • 1
    @Joseph It's saying that I don't have the permission to choose "no access" for everyone. – Airdish Apr 16 '16 at 05:33
  • @Airdish are you logged in as an admin account and did you unlock? (Small lock on the bottom of the window) – Kevin Grabher Apr 16 '16 at 09:23
  • @KevinGrabher Yes I did. After doing so, I click on "Everyone" and try to change "custom" to "no access" but it says that I do not have the 'necessary permission'. – Airdish Apr 16 '16 at 12:04
  • 1
    @Airdish With the update to OS X El Capitan, there are new security features that prevent users from tampering with System files. Not sure why they consider Safari a system file. But you have to disable the security if you have OS X El Capitan. http://stackoverflow.com/a/33640543/756329 – Joseph Hansen Apr 16 '16 at 15:09
  • @Joseph Thanks for the info. How will I know whether I have /usr/local ? And is it safe to disable the security? Is there any way to reenable it after I've disabled safari? – Airdish Apr 17 '16 at 10:47
  • 1
    @Airdish In Terminal, you can type ls /usr/local and it will tell you if it exists. It is safe to disable security and then re-enable it. You should be able to find re-enable instructions in the link I posted, but the answer is simply: instead of the command csrutil disable you type csrutil enable when you're done. – Joseph Hansen Apr 26 '16 at 22:57
  • @airdish I ran into a problem that looked like what you described, but I just had to click the lock button and it allowed me to change permissions. – Joel May 19 '16 at 12:51
  • sudo chmod 770 /Applications/Safari.app works for me – Jules Gagnon-Marchand May 24 '21 at 21:28
2

Just open the terminal and type:

cd /Applications
sudo rm -R -f Safari.app

It will ask for your password and proceed to delete Safari from the system. You may want to backup the app before.

Vextil
  • 21
  • This may be what I end up doing, but it might have unintended consequences with other apps that access Safari stuff. (This happens on iOS: you can disable Safari and still open links in your email in the Google Inbox app, for instance. If you delete Safari, that would not be possible.) – Joseph Hansen Apr 23 '15 at 18:23
  • 2
    I've used it like this for more than a month and no errors so far. Maybe I'm just being lucky haha. – Vextil Apr 23 '15 at 18:24
  • That's useful information. I might do it, if no better options are found. You got my upvote! – Joseph Hansen Apr 23 '15 at 18:26
  • This might not work on El Capitan because of rootless – Matt Jul 22 '18 at 00:08
  • You may wanna create a backup / change the location of the file instead of outright deleting it. Just changing the permission to ie 770 may still allow the system to update it – Jules Gagnon-Marchand May 24 '21 at 21:29