Clear Versions History & Auto-Save Cache Data

osxtips-x-256

Mac OS X include the Versions feature and Auto-Save ability, this lets users restore back to previous editions of a file by creating a constant sequence of saved file states while they are being worked on. All around, Versions and auto-save are useful, but they can also leave traces of sensitive documents and files you may not wish to keep around. Other than the privacy implications, this same technique can resolve some erroneous behavior with Versions as well. The simplest solution to these issues is to manually delete the Versions saved states cache directory.

The Versions cache directory is stored within the root of a Mac OS X installation here:

/.DocumentRevisions-V100/

The safest way to remove this folder will be multiple steps, so launch the Terminal (/Applications/Utilities/) and type the following:

cd /

To be certain you’re about to remove the proper directory, verify the directory name:

 
ls -l .DocumentRevisions-V100

Delete the directory and its contents with rm:

sudo rm -rf .DocumentRevisions-V100

Doing this one-time will not disable the feature, it will just remove all existing history of files that have been managed by Versions.

After a file has been processed automatically by Versions again, the directory will be rebuilt. Because this is involves editing system files and using the potentially catastrophic ‘rm -rf’ command, you shouldn’t use this tip unless you know what you’re doing and why you’re doing it.

Also, be aware that deleting the directory can cause some temporary issues with existing files that are locked or have saved states, even if file locking is turned off. Typically this will be in the form of an error message when using the file the first time, but it shouldn’t cause any serious issues.