How to stop MacOS from reopening apps after a crash

When the power goes out, my mac starts up and reopens everything that was running.


This is undesirable.


I would like for MacOS to never reopen windows when logging back in.


NOTE: I mentioned a crash from the power outage: this means that I cannot check the "do not reopen windows when logging back in" box.

Posted on Dec 13, 2021 5:08 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 13, 2021 5:10 AM

https://apple.stackexchange.com/a/309140/291858


CLI method


  1. Open Terminal.app
  2. Make the file owned by root (otherwise the OS will just replace it)
sudo chown root ~/Library/Preferences/ByHost/com.apple.loginwindow*
  1. Remove all permissions, so it can't be read or written to
sudo chmod 000 ~/Library/Preferences/ByHost/com.apple.loginwindow*


CLI method (undo)

  1. Re-enable "reopen all apps" after login
sudo rm -f ~/Library/Preferences/ByHost/com.apple.loginwindow*


1 reply
Question marked as Top-ranking reply

Dec 13, 2021 5:10 AM in response to PewMcDaddy

https://apple.stackexchange.com/a/309140/291858


CLI method


  1. Open Terminal.app
  2. Make the file owned by root (otherwise the OS will just replace it)
sudo chown root ~/Library/Preferences/ByHost/com.apple.loginwindow*
  1. Remove all permissions, so it can't be read or written to
sudo chmod 000 ~/Library/Preferences/ByHost/com.apple.loginwindow*


CLI method (undo)

  1. Re-enable "reopen all apps" after login
sudo rm -f ~/Library/Preferences/ByHost/com.apple.loginwindow*


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to stop MacOS from reopening apps after a crash

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.