Where does MacOS store old versions of Preview edited images? If you open an image in Preview and View->Show Markup Toolbar and then add some markup.Then close Preview you'll see the file has been edited




If I then double click the picture, which relaunches Preview there's a File->Revert To option



And if I choose "Browse All Versions" a UX like this appears



Where are these revisions stored? And while I'm thinking about it, is there a user friendly way to delete the revisions or do I just have to manually dig into the file system? I found this which has a section about deleting revisions but doesn't actually specify how to delete revisions.
Where are these stored?

There is a folder at the root level of the disk marked /.DocumentRevisions-V100, which stores the data for versioning of documents. This is owned by root and not in a user-friendly format, so is best left alone.

File formats that use Apple's CoreData APIs (e.g. Pages) create revisions using their own Undo list, so the data is preserved in the file as a series of undo instructions.

It's possible that some versioning is done on APFS volumes in a similar way to localsnapshots.

How can I delete them?


Select File > Revert To > Browse All Versions.
Once you're in the "Time Machine" interface, move the pointer to the top of the screen to recover the menubar.
Now, under File > Revert To, you will now have the option to Delete the selected version, or with ALT held down, Delete All Versions.