# Is there a way to make Preview not open all previously opened files?

Usually when I use Preview, it is when I see a .jpg or .png and I double click on the file to take a look at the file, but sometimes Preview will open up all the .pdf and .png I opened previously, possibly taking up a couple hundred of MB and opening 7 or 8 windows.

So it is a case I hope an app will not open all previously opened files. I know it can be done by clicking File, pressing Option, and then choosing Close All, but is there a way to tell an app not to open all previously open files such as for the case of Preview?

This is part of resume. A feature introduced with Lion.

Per default, windows are restored the next time you open the application. If you want to completly close all windows just one time, you can quit an application using ++Q instead of the standard +Q to quit an application.

## Undo resume for a specific application

Type the following command in the Terminal. Then restart the specific application.

In general the syntax is:

defaults write com."producer"."program-name" ApplePersistenceIgnoreState YES


Thus, in your case (Preview.app) it is:

defaults write com.apple.Preview ApplePersistenceIgnoreState YES


If you prefer a graphical interface, you can use TinkerTool.

This application gives you access to additional preference settings and allows to activate hidden features in the operating system.

## Undo resume for all applications

In order to disable this for all applications do this:

go to System Preferences->General->Restore windows when quitting...

• @動靜能量 For something that integrates a little more seamlessly with Lion, check out RestoreMeNot. It's just a settings pane as opposed to a standalone application. – gtmtg Jun 27 '12 at 12:36
• I assume there is no way to keep the restore feature but act as if I closed all windows when I manually exit an application? – dualed Aug 28 '12 at 9:22
• @dualed If you want to keep the restore feature, but act as if you closed all windows just this one time, you can use CMD+ALT+Q to quit. – gentmatt Sep 20 '12 at 10:12
• @gentmatt thanks, +1, I would have preferred a solution that is not using a different shortcut, but I guess this will do. – dualed Oct 12 '12 at 13:20

In addition to the other answers you an also use Option ⌥ + Command ⌘ + Q when you close preview instead of Command-Q which will ensure that it does not remember which files it had open.

One way is to use the old adage, leave it as you expect to find it!

If you have several windows open when you close it, then those windows will open next time. If you close the windows before you close the app, then next time you should have no windows.

So, if you are using Command ⌘ + Q to quit the app with open windows, try using Command ⌘ + W before doing so to closing the currently open windows.

Other than that you are just seeing the normal "resume" features at work.

If you want to DISABLE restore for a particular application, you can close all open documents for a program, quit the program, then go to ~/Library/Saved Application State/«app name», Get Info, and lock the folder.

This could work to preserve the state of "no windows open", or, as a bonus, you could use this to preserve any other window state that you always want to launch into.