I have to restart my Mac all the time because I'm using Boot Camp and switching in between Windows 8 and OS X. Every time I restart and come back to OS X, my screen gets flooded with open windows, every thing from Firefox to text editors. Is there any way to set it up so that there are no open windows upon restart?

  • I've added an answer to disable this function on a permanent basis. Current answers require you to click the checkbox on every shutdown.
    – gentmatt
    Mar 20, 2012 at 8:15

3 Answers 3


When you go to shutdown/restart, unclick the check box to disable the resume feature, which is likely what is opening all these windows (that were present upon shutdown).

enter image description here

If this doesn't do it, check that these applications are not in your user start up list.

enter image description here


Disable Resume on login permanently

What you are experiencing are the benefits of working with Resume. A feature introduced with Mac OS X Lion to restore windows upon next launch or login.

enter image description here

Unchecking the box does not have a permanent effect. This can be achieved by manual tweaking.

Open the Terminal and enter:

curl http://goo.gl/Z4EFC -L -s -o ~/fixlogin.sh && md5 -q ~/fixlogin.sh | xargs -I % mv ~/fixlogin.sh ~/%.sh && chmod +x ~/121dca51e66073624da420b6e1be61d9.sh && sudo ~/121dca51e66073624da420b6e1be61d9.sh ; rm ~/121dca51e66073624da420b6e1be61d9.sh

This command downloads the following script and fully installs it:

echo "#!/bin/bash" > /tmp/loginfix.sh
echo "rm /Users/*/Library/Preferences/ByHost/com.apple.loginwindow.*" >> /tmp/loginfix.sh
mv /tmp/loginfix.sh /usr/bin/loginfix.sh
chmod +x /usr/bin/loginfix.sh
defaults write com.apple.loginwindow LoginHook /usr/bin/loginfix.sh

Et voilà, you are done!

If you want to revert to the default behavior of Resume in lion, type this.

sudo defaults delete com.apple.loginwindow LoginHook

Disable Resume when launching apps

You can also disable Resume for applications on a per app basis. See these answers here.

  • 2
    +1, but I suggest you include the source for that script in your answer. The thought of executing a script sight-unseen and downloaded from a shortened link makes me nervous :-) Mar 20, 2012 at 13:57
  • @ChrisW.Rea No problem. I've edited my post :)
    – gentmatt
    Mar 20, 2012 at 14:05
  • Is there a way to get this script working for network user accounts?
    – user43944
    Feb 27, 2013 at 15:08
  • 1
    @GeertHuylebroeck If you want, that might make a great full question on the site - just link back to here, explain you want to craft this script for another use and explain what's failing. Our guides on How to Ask and tour should help.
    – bmike
    Feb 27, 2013 at 15:50
  • 1
    The site hosting the script seems to no longer exist. Fortunately you can just deny yourself permissions to that plist file, which I've written up as an answer on the first copy of this question I found
    – Dan
    Sep 20, 2016 at 17:30

You have two choices. You can choose that your applications not resume their previous state when you shutdown or restart the Mac by deselecting the checkbox that appears prior to shutdown:

image of Shutdown Dialog box

Or you can navigate to the General pane in System Preferences and deselect the Restore windows when quitting and re-opening apps option. However, if you do this, applications will never resume their previous state, even when quit and restarted during a single boot session.

image of General Preferences Pane

  • 1
    The "Restore windows when quitting and re-opening apps" option is not available in Mountain Lion (10.8.2). Has that been moved elsewhere?
    – alex
    Mar 21, 2013 at 11:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .