Can I disable OS X Lion Autosave and Versions?

5,314

Solution 1

It can be done by running the following Terminal command (for Preview in this example):

defaults write $(osascript -e 'id of application "Preview"') ApplePersistence -bool no

Replace Preview in the above command with the name of whatever app you want to perform this on.

For TextEdit you must additionally run the following command, in order to avoid sandbox errors:

defaults write com.apple.TextEdit AutosavingDelay -int 0

Also see this answer on Ask Different.

Solution 2

Go to system preferences, general tab, and check the box that says; ask to keep changes when closing documents. When you get out of that document a window appears that will ask you to revert changes. That is the option you need to click.

This will close out the window without saving any changes.

Solution 3

As of 10.8.4 "autosave" is applied to all applications including Xcode. This is especially problematic for webapp scripters who may find their unexpectedly autosaved Python scripts crashing Apache without their permission. the above given terminal command works to stop Xcode's autosave:

defaults write $(osascript -e 'id of application "Xcode"') ApplePersistence -bool False

As of this writing, "Ask to keep changes when closing documents" is broken with Xcode, so clicking the red button will save a script without asking. So if your cat walked on the keyboard and you closed the window, Apache may crash from the cat's scripting.

Share:
5,314

Related videos on Youtube

Philip
Author by

Philip

Updated on September 18, 2022

Comments

  • Philip
    Philip over 1 year

    In OS X Lion, there is a new feature which provides auto-saving and versioning functionality. I would like to disable this functionality - I just don't want it.

    I have a workflow that involves my trigger finger on cmd-S, I use my own VCS when necessary, I save as compulsively and I open applications like TextEdit and Preview as temporary notepads without wanting any changes saved automatically and without a stupid unlock dialog that then records my changes when I only want to see the changes and not record them.

    So, is it possible to turn off Versions without rolling back to 10.6?

    PS: Just asking how to disable, not for a discussion of the pros and cons of the features.

  • HikeMike
    HikeMike over 12 years
    This setting does not disable versions. It just adds a warning message when you try to edit a document after e.g. 1 day (minimum time period). It will still be saved every few minutes while editing.
  • skub
    skub over 12 years
    Autosaving is application specific an handled independently within each application. Versions is a function of the Time Machine and is handled within that.
  • Philip
    Philip over 12 years
    @skub +1 for letting me disable locking...is there a quick way to disable autosave application by application?
  • alpha
    alpha almost 12 years
    +1 for actually SHOWING an answer instead of just lamely linking without even a cliff-notes blurb. And I HATE 'watch this video' answers...
  • Philip
    Philip almost 12 years
    @user142040 If I remember to try this when I have a working machine (hopefully soon), I will and will report back. I like this idea. I hope it doesn't break the machine.... (consequently any reports from those who have tried it and encountered problems would be appreciated).
  • Philip
    Philip almost 12 years
    You and @user23369 are my new personal heroes.
  • Philip
    Philip over 11 years
    This must be new in Mountain Lion, yes? I'll give it a shot. Any idea how this will interact if I've already done the terminal commands in the accepted answer?
  • slm
    slm over 11 years
    Are there any references for this information. Seems like there might be some potential resources that expand upon this issue, if so please add them to this answer.