How to Permanently Prevent OS X 10.7 Lion from ever Re-Opening Apps After a Restart

While the latest version of Mac OS X, Lion, is generally wonderful, there is one “feature” that annoys thousands of people to no end: whenever your machine is restarted, every single application you happen to have open at the time is also relaunched and restored to the state it was in before you restarted. If you restart manually via the “Restart…” menu item, there is a checkbox you can uncheck which is supposed to shut off this behavior but it doesn’t always work. Additionally, if your computer restarts for any other reason — e.g. a power failure or a crash — you don’t even have the option of trying to prevent this behavior.

The downside of the behavior is obvious: it increases the time it takes to start up your machine into a steady state and it re-opens apps you may not be using anymore.

If you want to prevent this behavior entirely, there is now a foolproof, fully reversible way to do it. Simply:

  1. Quit all of your apps.
  2. Navigate to here: ~/Library/Preferences/ByHost/*.plist (whereby * is a bunch of characters)
  3. Click the file, do a File > Get Info (or command-I if you’re a pro), and lock it using the Locked checkbox.

Voila. You’ve now prevented Lion from saving what apps and windows are open. To reverse this setting, simply unlock the file!

Another helpful hint as well: Lion, by default, hides your ~/Library/ folder. To make it visible again without showing all of your other invisible files, simply open up Terminal and type:

chflags nohidden ~/Library/

Like this entry? You can follow me on Twitter here, subscribe via email here, or get the RSS feed if that's how you roll.

21 Responses:

  1. Brade says:

    Solid tip.

    Another thing any Mac user should do is install Tinker Tool straightaway:

    It can help resolve many annoying issues. I use it to show hidden files, put an eject button on the menu bar, etc.

  2. AHHP says:

    I love life again :D

  3. Elisabeth Robson says:

    Thank you for this, especially the Library thing, that was driving me nuts.

  4. Devon Shaw says:

    THANK. GOD. Thank you so much.

  5. I may be the only person that had this issue, but after locking that .plist and a reboot iTunes would just hang on launch with no solution but to unlock the .plist and reboot again.

  6. That’s a pretty nuclear option for what can be much easier. This accomplishes the same effect much more safely:

    defaults write LoginwindowLaunchesRelaunchApps -bool false


  7. Mike D. says:

    Jay: Why would you classify it as a nuclear option? It’s fully reversible, doesn’t require command-line hackery, and is just a matter of locking a preference file. Seems quite harmless to me.

    Also, on that thread you linked to, there are some people who say the command line method is not working for them, no?

  8. Bakari says:

    Hey, thanks for this. It’s one of the most annoying features Apple has ever put into an OS upgrade.

  9. Raf says:

    Brilliant! Now all we need is a way to disable Apple’s forced Autosave/Versioning…

  10. I can’t for the life of me understand why you’d ever want to disable this permanently.

  11. Mel Hogan says:

    Great post Mike!

  12. rory says:


  13. Philip L says:

    Great Info. I hate it when Lion does this. One other question though is when opening an application, it seems to open all the past files that were open too. I just want to start a new file! Do you know how to stop this. Similar problem but from within the application.

  14. Justin says:

    @Philip L: this might be what you’re referring to:

  15. Doug says:

    “Another helpful hint as well: Lion, by default, hides your ~/Library/ folder. To make it visible again without showing all of your other invisible files, simply open up Terminal and type:

    chflags nohidden ~/Library/”


    Hold option and open the Go menu in the finder

  16. Fittingly (or is this actual irony?), no matter how many times I mark this entry as read in my aggregator, it keeps popping back up as unread.

  17. I had the same exact frustrations with this, but fortunately Apple just fixed this in the most recent Lion update (10.7.4)! The button now remembers the most recent state (i.e., if you uncheck it, it will stay unchecked the next time the dialogue box opens).

  18. Saedi Folluf says:

    Clearly, 99% of the users do not realize that the checkmark has ABSOLUTELY NO influence on whether the system will restart every single piece of software and document after the system has CRASHED! And the fact that system will gladly relaunch you into the same state from which you crashed and possibly crash you again (if the crash is app or doc related) is the MOST IDIOTIC thing a developer on this planet has ever made a wrong decision to do. I can’t even start imagining what was Apple thinking they’re doing with this CRAP of a misguided “feature”!

  19. Mark says:

    the methods above did not, or onlypartially worked for me, I found a better way to do this.

    open up Terminal and type:

    chflags nohidden ~/Library/

    Quit all of your apps.
    Navigate to here within your home directory ie users/your user name/: ~/Library/Preferences/ByHost/*.plist (whereby * is a bunch of characters)

    delete this file
    reboot computer, it will make a new file with same name

    Click the file, do a File > Get Info (or command-I if you’re a pro), and lock it using the Locked checkbox.

    this will stop all auto restarts

  20. dxo says:

    Great tip for kiosk computers I’m installing where I need to start up programs in a specific order and timing from my applescript. Apple’s way of doing things was screwing up everything.

  21. Nancy Drew says:

    I followed the instructions exactly, especially taking care to quit all applications. I still get three Sent Mail windows which open every time I restart. I also checked to make sure that Apple Mail wasn’t in the list of “Login Items”. So, this doesn’t always work either.

The Ocean in 185 Lines of Javascript:

Mesmerizing. Try tweaking some of the variables in the “sea” section of the code.

“"Design had been a vertical stripe in the chain of events in a product’s delivery; at Apple, it became a long horizontal stripe, where design is part of every conversation.””
Why I Just Asked My Students To Put Their Laptops Away:

A great essay about how toxic everyday distractions can be.

Humanity's deep future:

A group of researchers at the Future of Humanity Institute talk about where our race may be going and how artificial intelligence could save or kill us all.

Steve Jobs speaks about the future at the International Design Conference in 1983:

31 years later, it’s safe to say this is one of the most prescient speeches about technology ever delivered. Jobs covers wireless networking, tablets, Google StreetView, Siri, and the App Store (among other things) many years before their proliferation. A fantastic listen.

How to travel around the world for a year:

Great advice for when you finally find the time.


A fantastic app for prototyping your design work onto real world objects like billboards, book covers, and coffee cups. This seems like just as great of a tool for people learning design as it does for experts.

50 problems in 50 days:

One man’s attempt to solve 50 problems in 50 days using only great design. Some good startup ideas in here…

How to Do Philosophy:

If you’ve ever suspected that most classical philosophy is a colossal waste of time, Paul Graham tells you why you’re probably right.

TIME: Why Medical Bills Are Killing Us:

Stephen Brill follows the money to uncover the pinnacle of corruption that is the U.S. Health Care system. A must-read article if there ever was one.

DIY Dot Org:

A beautifully designed site full of fun and challenging DIY projects. I could spend months on here.

The Steve Jobs Video Archive:

A collection of over 250 Steve Jobs videos in biographical order

Self-portraits from an artist under the influence of 48 different psychoactive drug combos.

Water Wigs are pretty amazing.

David Pogue proposes to his girlfriend by creating a fake movie trailer about them and then getting a theater to play it before a real movie. Beautiful and totally awesome.