Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

As titled, is there anyway I can disable it?

Sometimes when I close a TextEdit window or whatever application, I really want to purge it. But when I open the application again, the same text that I didn't want appear again, and that is really annoying.

Thanks.

share|improve this question
1  
Do you mean disabling Resume or Versions? Resume can be disabled by unchecking Restore windows when quitting and re-opening apps in the General preferences. –  Lri Mar 29 '12 at 15:16

4 Answers 4

up vote 2 down vote accepted

There has been a long discussion on the Discussions fora of Apple. A lot of people are complaining about it, but as far as I know, there isn't a solid solution at the moment.

It seems the app-maker can decide wheter or not to include the 'Versions' option. So the only guess I can make is to return to a previous version of the app. In case of TextEdit, it would mean you have to go back to Snow Leopard, which is clearly not a good option.

You can always try to tell Apple about your findings, maybe if a lot of people do so (and it looks like it), Apple will consider a new way of handling the versions.

share|improve this answer

Yes, you can disable Versions globally, I described it here:

How to disable Versions in OS X Lion

I found a way to disable Versions (not Autosave) in a (hopefully) non-destructive reversible way: (re)move the SQLite database that Versions uses

Careful, this comes with absolutely no warranty and may break your system!

sudo mv /.DocumentRevisions-V100/db-V1 /.DocumentRevisions-V100/db-V1_off; sudo touch /.DocumentRevisions-V100/db-V1; sudo killall revisiond

If it worked you'll be notified e.g. in Textedit when you close a document:

enter image description here

That (probably) means that your document will still be automatically saved in certain intervals, but once you close it (or the program) you can only retrieve the latest version (and Time Machine backups, if available).

The changes can be undone with sudo rm /.DocumentRevisions-V100/db-V1; sudo mv /.DocumentRevisions-V100/db-V1_off /.DocumentRevisions-V100/db-V1; sudo killall revisiond


Edit 2012-04-04:

Versions (especially of Autosave) may still end up in ~/Library/Containers as nicely described in this answer.

share|improve this answer
    
There's no shame in copying the content from your other answer over here. :) –  gentmatt Apr 4 '12 at 16:21
1  
Added the full answer from my earlier post. –  iolsmit Apr 4 '12 at 16:31

After a quick Google, it looks like there isn't. Though I did find this related post on Super User. Apparently you can do it in TextEdit (I'm not at my Mac) by going to Preferences > Open and Save > Savings Files. Applications handle this differently, so there is no system-wide setting yet.

share|improve this answer

Auto save cannot be disabled in OS X Lion. There are a few things you can do that work around it a little, but don't seem to resolve the problem completely:

  • For individual documents, "lock" the document by clicking the little icon in the center of the title bar and choosing lock.
  • System wide (doesn't work for every app), go to System Preferences, select General, then uncheck "Restore windows when quitting and re-opening apps."
  • Use a script to delete the versions file(s) periodically, or on shutdown.
  • Use a script to delete the versions directory on startup, thus preventing apps from storing versions in the first place

For the third option, one possible script is:

--{code}
--[SCRIPT deleteRevisions]
my deleteRevisions(path to startup disk as text)
-- my deleteRevisions("Aluice-500-Lion:")

on deleteRevisions(leVolume)
          local leDossier, cheminUnix
          set leDossier to leVolume & ".DocumentRevisions-V100:"
          set cheminUnix to quoted form of POSIX path of leDossier

  --  do shell script "stat -F " & cheminUnix
  --> "d--x--x--x 7 root wheel 238 Aug  7 11:21:07 2011 /.DocumentRevisions-V100//"

  do shell script "chmod 700 " & cheminUnix with administrator privileges

  --  do shell script "stat -F " & cheminUnix
  --> "drwx------ 7 root wheel 238 Aug  7 15:47:00 2011 /.DocumentRevisions-V100//"

  do shell script "rm -dfr " & cheminUnix with administrator privileges
  --> ""
end deleteRevisions

--=====
--[/SCRIPT]
--{code}

Some users have reported that some apps use different app-specific directories and so the above doesn't work completely, but takes care of the simple apps.

For the fourth option, a startup script might be:

--{code}
--[SCRIPT deleteApplicationsState]

set leDossier to (path to library folder from user domain as text) & "Saved Application State:"

set cheminUnix to quoted form of POSIX path of leDossier

do shell script "chmod 700 " & cheminUnix --with administrator privileges"

do shell script "rm -dfr " & cheminUnix --with administrator privileges
--> ""

--=====
--[/SCRIPT]
--{code}

Again, it doesn't account for apps that store their versions elsewhere.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.