Free up storage
How to Find macOS's Hidden Document Versions
macOS keeps hidden version history of every document you edit. Find where versions are stored, how much space they take, and how to manage them.
You edit a Pages document, save, edit more, save again. Each time, macOS quietly keeps the previous version. After a year, that document might have hundreds of historical versions stored invisibly. The system is called Document Versions, it works behind the scenes, and most Mac users have no idea it exists or how much space it uses.
This isn’t bad — version history saves you when you accidentally overwrite something — but on Macs heavy with document editing, the cumulative version cache can be 10-20GB. Here’s how to find it, see what’s there, and manage the size.
What document versions actually are
Whenever you save a file in an app that supports versioning (most Apple apps and many third-party ones), macOS stores a copy of the previous version in a hidden system database.
Apps that use version history:
- Pages, Numbers, Keynote
- TextEdit
- Preview (for PDFs and images)
- Notes (uses its own database)
- Many third-party apps that adopted Apple’s NSDocument framework
You can browse versions through any of these apps via File → Revert To → Browse All Versions. Time Machine-like interface, scrubbing through dates.
Where versions are stored
The version database lives at:
/.DocumentRevisions-V100
That’s at the root of your startup drive. It’s hidden and protected — even root can’t directly modify it. macOS manages it via system services.
To check the size:
sudo du -sh /.DocumentRevisions-V100
You’ll need to enter your password. On heavy-use Macs, expect to see numbers between 5GB and 50GB. The folder grows over time as you accumulate edits.
Inside the folder are subdirectories for each user (by UID), then a db-V1 SQLite database tracking every version, and PerUID folders containing the actual version data files.
/.DocumentRevisions-V100 like a normal folder. The OS uses it through system services, and direct access requires sudo plus careful navigation.Why versions accumulate
Every save creates a new version, but macOS deduplicates aggressively when content is similar. Edit a 50KB document and add a paragraph; the new version takes only the changed bytes, not 50KB again.
The accumulation problem comes from:
- Heavy editors — People who save dozens of times an hour
- Large media files — PDFs and images don’t deduplicate as well
- Many distinct documents — Each tracks its own version chain
- Long retention — Versions can persist for years
Listing tracked documents
To see what’s tracked, query the version database directly:
sudo sqlite3 /.DocumentRevisions-V100/db-V1/db.sqlite "SELECT file_path, COUNT(*) FROM files GROUP BY file_path ORDER BY COUNT(*) DESC LIMIT 50;"
That returns the top 50 files by version count. You’ll see which documents have the most accumulated history.
For total version count:
sudo sqlite3 /.DocumentRevisions-V100/db-V1/db.sqlite "SELECT COUNT(*) FROM versions;"
Numbers in the thousands or tens of thousands are normal for active Macs.
Managing versions per document
The user-facing way to manage versions is through the app that created them.
Pages, Numbers, Keynote, TextEdit:
- Open the document
- File → Revert To → Browse All Versions
- Scrub through versions on the right
- Delete unwanted ones via the right-click menu (limited functionality)
Preview:
- Open PDF or image
- File → Revert To → Browse All Versions
- Same interface
You can’t bulk-delete versions for many documents at once through any official UI. You’d need to open each document.
Triggering a version cleanup
macOS prunes older versions automatically based on age and free space pressure. To encourage faster cleanup:
sudo defaults write /Library/Preferences/com.apple.systempolicy.versions.plist DocumentRevisionsMaxRetention -int 30
That sets retention to 30 days. The default is much longer. Restart for the change to take effect.
To revert:
sudo defaults delete /Library/Preferences/com.apple.systempolicy.versions.plist DocumentRevisionsMaxRetention
Be cautious with this. Reduced retention means losing the safety net of “I can revert this document to last week.” For most users, the default behavior is fine.
Nuclear option: clearing all versions
Apple doesn’t officially support manually clearing the entire version database. Doing so removes the ability to revert any document to any previous version.
But on Macs where the folder has grown excessive (30+ GB) and you’re tight on space:
sudo rm -rf /.DocumentRevisions-V100
After reboot, macOS recreates the folder empty. All historical versions are gone. New version tracking begins fresh.
This is destructive. You lose the ability to revert any document to an older state. Think carefully before doing this — it’s a one-way operation.
App-specific version handling
Some apps maintain their own version history outside the system database.
Notion keeps version history server-side. Local cache is unrelated.
Bear keeps versions inside its own database at ~/Library/Group Containers/9K33E3U3T4.net.shinyfrog.bear.
Ulysses uses iCloud or Dropbox for version sync; local versions are minimal.
Notes (Apple) uses its own database at ~/Library/Group Containers/group.com.apple.notes/.
Mail doesn’t version messages but does keep deleted-then-restored items in mailbox states.
These app-specific stores aren’t part of /.DocumentRevisions-V100 and aren’t affected by clearing it. Each app’s storage is managed separately through that app’s interface.
Finding heavy version offenders
If versions are eating space, the cause is usually a small number of frequently-edited heavy files.
sudo sqlite3 /.DocumentRevisions-V100/db-V1/db.sqlite "SELECT file_path, COUNT(*) as version_count FROM files GROUP BY file_path ORDER BY version_count DESC LIMIT 20;"
Top 20 files with the most versions. If you see a single document with 500+ versions, that’s where most of your version space goes.
For each heavy offender, you can:
- Open the document
- Browse all versions
- Save a fresh copy as a new file (this resets version count)
- Delete the original
- Use the new copy going forward
The new copy starts with version count 1. The old version chain disappears with the deleted original.
Why this hides in Storage settings
System Settings → General → Storage doesn’t surface document versions as a category. The /.DocumentRevisions-V100 folder is at the filesystem root, classified as system data.
You can’t open it in Finder normally. Even with hidden files visible (Cmd+Shift+.), the folder is protected.
The result: large version databases inflate System Data without explanation. Users see 80-150GB of “System Data” and have no idea a chunk is document versions.
To verify version size against System Data:
sudo du -sh /.DocumentRevisions-V100
Plus checking Storage settings. The version size is a piece of the System Data total.
Should you bother?
For most users, document versions take a few hundred MB to a few GB. Not worth attention.
For heavy editors of large files (think: photographers editing huge images, writers with massive Pages documents, designers with complex Keynote files), versions can hit 20+ GB. Then it’s worth managing.
Signs version management might help:
- Mac is tight on storage and System Data is large
- You edit large documents (>10MB) frequently
- You’ve used the same Mac for multiple years
- You’re not aware of using version history but the folder is huge
If those don’t apply, document versions are quiet infrastructure that just works. Leave them alone.
A safer middle ground
Instead of nuclear deletion, set a moderate retention:
sudo defaults write /Library/Preferences/com.apple.systempolicy.versions.plist DocumentRevisionsMaxRetention -int 90
90 days of version history. Old versions get pruned automatically. You keep the safety net for recent edits without unlimited accumulation.
This is invisible to most users — you’d never notice 90-day history versus the default longer retention unless you specifically tried to revert a document from a year ago.
Building it into normal cleanup
Document version management isn’t really part of routine cleanup — it’s more of a one-time fix when you discover the issue. After clearing or pruning, the folder grows again from current activity.
For a regular health check, just monitor sudo du -sh /.DocumentRevisions-V100 once or twice a year. If it crosses 20GB, take action. Otherwise, the system handles itself.
A cleaning tool may surface version database size as part of a broader system data scan. Specific version management requires app-specific actions, but knowing the database exists helps explain mysterious System Data inflation.
The biggest insight from this guide is just knowing it exists. Most Mac users go years without realizing every TextEdit save and Preview annotation is being archived in a hidden system folder. Once you know, you can decide whether to manage it or leave the safety net in place.