What Is ~/Library/Saved Application State?

Your user folderUpdated

Definition
Full path
  • ~/Library/Saved Application State
Scope
Your user folderInside your home folder — one copy per user account.
Freshist & this folder
Freshist checks this folder when uninstalling an app. When you uninstall an app, Freshist looks here for items that belong to it. Matches on the app's bundle ID can be pre-selected; name-only guesses are labeled “not sure” and never pre-selected. Removed items go to the Trash, so you can undo.

From Freshist's own cleaning rules — the same catalog the app uses.

What macOS saves here

Since OS X Lion, apps that support state restoration can reopen exactly as you left them: the same documents, window positions, scroll positions and selected tabs. To do that, each app writes a small snapshot to ~/Library/Saved Application State/<bundle ID>.savedState while it runs. The next time the app launches, macOS hands that snapshot back and the app rebuilds its windows.

The same data supports Reopen windows when logging back in, the checkbox in the dialog that appears when you restart or log out.

Sandboxed apps write their snapshot inside their container instead, at ~/Library/Containers/<bundle ID>/Data/Library/Saved Application State. Some show up in the main folder only as a link pointing there, so this folder alone doesn't capture every app's state.

Is it safe to delete?

Yes. Nothing here is a document or a setting you chose deliberately.

What you removeWhat happens next
A folder for an app you no longer haveNothing; the app is gone
A folder for an app you useIt opens with a fresh window instead of your last layout
A folder for an app with unsaved untitled documentsSome apps keep those drafts in saved state, so they can be lost
The whole folder's contentsEvery app forgets its last window layout once

Only the third row carries real risk. TextEdit, Preview and many editors can restore untitled documents you never saved. If you rely on that, save those documents first.

Folders here are typically small, from a few kilobytes to a few megabytes each. Clear them when an app misbehaves on launch or you want a clean start, not to recover space.

Inspecting it

ls -la ~/Library/"Saved Application State"
du -sh ~/Library/"Saved Application State"

Folder names match bundle IDs, such as com.apple.Preview.savedState, so it's easy to match each one to an app.

Clearing it by hand

  1. Quit the app whose state you want to reset. If an app is running, it writes its state again.
  2. In Finder, choose Go → Go to Folder… and enter ~/Library/Saved Application State.
  3. Move that app's .savedState folder to the Trash, or select everything to reset all apps.
  4. Open the app again. It should start with a single new window.

For a sandboxed app, also look in its folder under Containers, as described above.

Preventing it instead

If you never want windows restored, change the setting rather than clearing the folder repeatedly. In System Settings → Desktop & Dock, turn on Close windows when quitting an application. When you restart, deselect Reopen windows when logging back in.

This folder is also covered as a cleanable item in our Saved Application State cache guide. When you uninstall an app, its .savedState folder is one of the smaller leftovers next to Preferences and Caches.

Sources

Frequently asked questions

Can clearing saved state fix an app that crashes on launch?

Sometimes. If an app crashes while restoring its windows, removing its .savedState folder makes it start with a fresh window. If it still crashes, the cause is elsewhere, often in its preferences or data.

How do I stop apps from reopening their windows?

Turn on Close windows when quitting an application in System Settings → Desktop & Dock. For a single quit, hold Option and choose Quit and Close All Windows from the app's menu.

Why are some entries in this folder aliases?

Sandboxed apps keep their saved state inside their own container under ~/Library/Containers. macOS sometimes places a link here that points into that container.

Keep reading