Saved Application States in Lion

Every new feature comes with its own troubleshooting as most will, if only eventually, have problems. Lion comes with a cool new feature where the state of each application is saved and when the application is re-opened the windows are just as you left them when closed, even in the same positions on the screen. This can be pretty useful with something like Terminal, where I often don’t restart the app for long periods of time because I want to see my recent history across multiple sudo’d users. When you open Terminal, the previous commands are grey, but there. But I’ve run into a few instances where an application crashed and continued to do so upon restart. The way I was able to remedy this was to trash that application’s Saved Application State directory, kept in ~/Library/Saved Application State. Each application should have an entry in here using the typical property list format naming convention (e.g. com.krypted.myapp.savedState). Trash that folder with the app closed and it will open fresh and clean. To do so (continuing on with the com.krypted.myapp.savedstate example): rm -Rf ~/Saved Application State/com.krypted.myapp.savedstate Finally, it’s worth noting that some applications store certain aspects of saved states in their default domain. So if you’re clicking on a tab in a System Preference pane, keep in mind that to reset some things you might need to locate the correct plist file and nuke the settings within the plist.