MacOS – `rm` and Mac OS X’s Versions feature

macosversions

I assume that deleting a file via Finder also deletes any previous versions in /.DocumentRevisions-V100 that are attached to that file.

But what's happening if a file is deleted in Terminal with the rm command? Are previous versions left behind or do they actually get deleted, too?

Best Answer

rm just deletes the file(s) specified on the command line. So if you need to delete additonal files from /.DocumentRevisions-V100 you need to delete them explicitely as well.