Delete Specific Application Saved States from Mac OS X Resume

Jul 17, 2011 - 31 Comments

Remove specific applications saved states from Resume in OS X Lion One of the new features in OS X Lion and OS X Mountain Lion is the “Resume” ability for all applications to save their last state, meaning when you relaunch the app or reboot your Mac, the application will “resume” and reopen again showing all of the windows and data that was last in use. This is a great feature for some apps and situations, but there are also times where you don’t want past app states to reappear.

How to Delete Saved Application States from Resume on a Per App Basis in OS X

This tip will show you how to selectively remove saved app states for chosen applications. You can think of Resumes saved state files much like cache files, they will be regenerated upon an apps use, so deleting them is not permanent and only affects the last saved state.

Quick Note: This tip accesses ~/Library/ which is hidden by default in Mac OS X Lion and beyond. You can use Command+Shift+G to “Go To” the folder ~/Library or, if you want to, you can change Lion to show the user Library directory with a simple entry into the command line.

  • Navigate to ~/Library/Saved Application State/ – this is easy with Command+Shift+G
  • You’ll see a list of saved app states named com.apple.(Application Name).savedState
  • Delete the folder pertaining to the application whose saved state you no longer want to maintain

Delete specific application saved states in Mac OS X 10.7 Lion

Keep in mind this is a temporary solution, as mentioned before, Mac OS X 10.7+ recreates these files upon each applications launch. Your only other option would be to disable Saved Application States completely, but most people find the feature useful enough to not want to do that. If you wanted to you, you could remove all of the files in this directory as well.

Deleting Resumes Saved App States in Lion Often? Create an Alias

If you find yourself doing this frequently, you may want to create an alias on your desktop for the “Saved Application State” directory, then you can quickly remove the saved states that you don’t want to maintain.

Saved Application State alias for easy access to delete saved app states

Chances are good that some apps will include options to disable this feature natively, or at least a third party solution will appear that allows per-app for preserving or preventing saved states. Until then, this is a perfectly viable solution.

Thanks to Randy for sending in this great tip.

.

Related articles:

Posted by: William Pearson in Mac OS, Tips & Tricks

31 Comments

» Comments RSS Feed

  1. James says:

    Brilliant you just saved me the most frustrating time and got files working you’re stars!!

  2. Callum says:

    can i do this on other versions of the mac ?

  3. Prasad says:

    Great tutorial. Thanks.

  4. Rob says:

    This is the kind of that drives me nuts about apple sometimes. I have a 2g macbook. Often I have to quit apps to save memory and OSX opens the all up again after restart. JUST GIVE US CONTROL! not workarounds for geeks!

  5. Jawed says:

    best solution for application that is not responding in Mac OS X is “Force Quite”:

    command+option+esc

    it worked for me!

  6. Michael Johnston says:

    The problem is that with many apps, Lion does not observe when windows are closed. So once you’ve ever opened a window, it will always open every time you start that app, no matter how many times you close it again.

    This is incredibly annoying.

  7. Bob says:

    Nothing above works for me.

  8. […] is easy and actually pretty similar to deleting application saved states, just follow […]

  9. Elizabeth says:

    I have followed the instructions for disabling the application saved status for Pages, as I usually have a million different documents open and I liked restarting my computer with a blank slate. Deleting the saved application status folder and disabling the resume function seemed to have helped, except in the instance when I have opened a .doc file and I quit Pages. Normally I would be prompted to save it as a .pages file, but now it just quits, then has the (unsaved) .doc file open again when I restart Pages. This is bloody annoying. If anyone has any tips I would greatly appreciate it.
    Cheers.
    PS. I’m sure this function (and many more new Lion tools) would work as it’s meant to on a newer machine than mine, but I’m not sure my poor old ’08 MacBook can handle it. I’m getting a lot of spinning wheel of death. Any other recommendations to make the system a little less sluggish?

  10. Robert says:

    How do you delete a simple PDF file anymore without manually throwing in trash? I love the POTENTIAL and the BOOT sequence with a live terminal… be great to get a linux or some over OS for these future trying times as I have had — OS keeps freezing, locking up or crashing. Apple suggests repair permissions or restart or shut down – sure the solution, right… I’ve looked into the recovery EFI and poked around in terminal – wish these things came with more docs to tweak and repair / fix issues like this. This morning was the first time I actually recovered to any STATE at all, all the other times it froze or keyboard went dead, nothing… well it restored it to ALMOST the same state – the windows were correct, and open apps but the files on the desktop were all neatly in a pile – and OH yeah APPLE if you are listening – none of the crashes would allow me, even after clicking or using a command – to pull up FORCE Quit – That’s a usually easy fix for many ISSUES without taking down the whole platform, not in LION YET… and the few times I got it to open, sometimes it would actually force an app to quit and sometimes it refused… and YES I have what’s suppose to be a compatible make model and oil change, I’ve had over 40 Macs and this system has STUD potential but is a 1 second let down.

  11. Kris Morf says:

    You can set permissions on the folder to “Read Only” to completely disable the feature.

  12. I disable this behaviour on an app-by-app basis, I find it useful (for some apps at least!)

    Basically do:

    chown -w ~/Library/Saved Application State/app_folder_here

    I’ve written a quick guide here:
    http://stu-bot.com/2011/07/21/lion-annoyance-5-stop-saving-application-states-on-an-app-by-app-basis/

  13. John says:

    Now why didn’t apple just ad an extra right click option on a dock icon or a click and hold to “jiggle” running apps so you can quit them completely like in iOS?

  14. rezecib says:

    My first thought on how to disable this for a given application is to delete the contents of the folder, then make it unwritable, either by changing the permissions or redirecting it to /dev/null. That’s my standard technique where a program keeps creating a file that I don’t want it to, and I think it should work in this case, assuming Apple programmed it well enough to be able to handle that folder being empty, which is extremely likely.

  15. […] manually deleting specific apps saved Resume states is too tedious for you, you can always choose to just disable the Resume and App Restore feature […]

  16. _udo_ says:

    If frequent removal of several saved application states is indicated then an Apple script should be the fastest solution–with the Scripts Folder on the menu bar.

    • Ex2bot says:

      I was thinking of a quick Automator script.

      • Tim says:

        I created an Automator script to move all the files to the trash. (I have no need or desire for any of the saved states.) My workflow is (1) Get Specified Finder Items – Saved Application State folder; (2) Get Folder Contents; (3) Move Finder Items to Trash. I saved this as an application and then coupled it with some restart and shutdown applescripts I had already created.

        Thanks, by the way, for this article! I was going nuts every time my computer restarted and all of those programs were relaunching.

  17. albinoz says:

    this remove state of resume, but not resume :/

  18. alinaonme says:

    a good solution for me

    sudo chmod -R u-w,go= ~/Library/Saved\ Application\ State

  19. Dan says:

    I’m thinking that touching blank files inside the folder and then locking them would prevent new Resume states from being written. I’ll have to test once Lion’s released.

  20. PaSav says:

    Fast way to go to your ~/Library folder : Hold Alt -> Go -> Library will appear.

  21. Me says:

    Maye try making a folder with the name an app you don’t want to save state to use, and change the permissions to not include access for the user the app would be running as. If the apps/framework handle this gracefully that would prevent state from ever being saved without having to watch the directory.

    • Lance says:

      That is a good solution and should work, just chmod -x would be sufficient but may cause Resume trouble

  22. masterof0 says:

    Use Hazel from Noodlesoft to monitor the folder and remove unwanted apps from saving state

  23. Nonyo Business says:

    Ha… ha, I’m guessing safari and chrome are two applications people will use this a lot for.

  24. masterof0 says:

    I have set up Hazel from Noodlesoft to monitor the folder and automatically delete the folders for apps that I do not want maintain saved states for.

  25. Tigerblood says:

    Excellent! I wondered if there was a solution beyond disabling entirely. This gives me a couple of ideas for more permanent solutions, I’ll let you know if what I cook up works!

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site