MacOS – way to make Preview not open all previously opened files

macospreview

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?

Best Answer

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.

enter image description here

Undo resume for all applications

In order to disable this for all applications do this:

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