How Sketch took over 200GB of our MacBooks

Thomas Degry
4 min readJun 2, 2015

Here at iStrategyLabs, Sketch by Bohemian Coding is a tool we use everyday. It’s extremely intuitive, which you know if you have used it before! Recently we ran into an issue — a caveat that took up between 60 and 200GB on our hard drives.

How we found out about it

Maggie, one of our great designers, kept getting a full hard drive warning on her machine. Our first thought was to unsync all of her big dropbox folders; but that didn’t solve the issue. We weren’t sure what was causing the problem, so I went on a quest to find out where all this disk space was going!

Finding the issue

We started off by running a simple daisy disk scan, here are the results:

Where did that remaining 270gb go to?

Daisy Disk shows the Macbook’s hard drive filled up for 406GB, though it is only able to account for 50% of the gigs. The Users folder takes up almost all the space, with only 136GB. So where did all that other space go? I figured Daisy Disk’s default scan isn’t as administrator, so I opened up a terminal window and started looking around and quickly found this mysterious folder in the root directory of the hard drive: /.DocumentRevisions-V100. It was HUGE.

The folder was a whopping 212GB, hidden away on the hard drive.

Printing the size of the DocumentRevisions folder solved the mystery.

You can easily find out how big your Document Revisions folder is by running this command in terminal, it will prompt you to enter your administrators password. The characters from your password won’t be visible as you type it, but I promise it is working! When you’re done hit return and the folder’s size will be printed!

sudo du -sh /.DocumentRevisions-V100

I quickly figured out that none of our developers were having this issue, so clearly this was a design related problem. Not every designer has a folder as big as Maggie’s; some of our designer’s folders were only around 2GB, which is totally fine.

The Cause

DocumentRevisions-V100 is an internal version control system introduced by Apple in OSX Lion. It basically saves a copy of a file each and every time you save it. Apple uses it for TextEdit, KeyNote, Pages, Numbers, and some other programs. Developers can also interact with this API in their apps. Basically this system is a very big database file that keeps track of all your changes to documents and allows you to revert back to any versions. When you think about it, it is really an amazing system.

Version control allows you to go back to every saved version of a file.

Figuring out which app was causing this problem was not too hard. The main difference between program usage across our design team is that not all of us use Sketch — some designers still stick to their good old pal Photoshop. I figured the issues had to be related to this difference. Monitoring this folder proved my point; every time I would hit ⌘ + S on my keyboard, it would add a small 30 megabyte to this folder. Of course, over time, it adds up and you end up with a gigantic folder.

The Fix

There’s not a lot to find out about this whole system online, although to be honest, I didn’t look for that long. My guess is Apple is smarter than Bohemian Coding about how they do version control. There is still one thing i’m not sure of: I have no clue how to fix it. People who just delete the entire folder report slow system performance, so I don’t think you want to do that. I do know how to stop it, but I do not know if there’s a safe way to revert it. Preventing it is easy, you can force Sketch to stop version control by pasting this line in your terminal. It won’t print a result or success message but you should be fine after this!

defaults write -app ‘sketch’ ApplePersistence -bool no

Version control is useful though, so please, please, have a system for backups if you do this. Personally, the trade off between hundreds of gigabytes of storage being taken and disabling version control was easy, as we use dropbox.

We run this command now by default on every new hire’s Macbook.

We did end up doing some clean installs to free up the DocumentRevision’s space again. If anyone knows a better solution, please let us know. Hopefully Bohemian Coding just adds a checkmark to the Sketch preferences soon to disable this.

Happy designing designers!

Also a big thanks to Demetri Caminis and Thibault Maekelbergh for helping me investigate and confirm these details!

--

--