While reviewing our SharePoint storage, one site stood out. Most of its storage wasn’t in any library the users could see. It was sitting in the Preservation Hold Library, the hidden library SharePoint uses for retention, and it had grown to 665 GB.
The site belonged to a team that works in AutoCAD, and it was covered by a seven-year retention policy. Neither of those things is unusual. Put together, they turned out to be expensive.
This article explains why it happens. It comes down to the way AutoCAD saves drawings and the way SharePoint retention treats deleted files, and once you see the two side by side, the growth makes complete sense. I’ll also cover how to check whether your own sites are affected, how we got around 571 GB of that space back, and what to change so it doesn’t happen again. If you run retention policies and anyone in your organisation saves CAD drawings into SharePoint or Teams, it’s worth ten minutes.
How the Preservation Hold Library works
When a retention policy covers a SharePoint site, SharePoint creates a hidden library called the Preservation Hold Library. Its job is to keep copies of content that users change or delete, so the organisation can still produce it later. Microsoft’s documentation on retention for SharePoint and OneDrive sets out the rules (Microsoft Learn: Learn about retention for SharePoint and OneDrive). Four of them explain everything that follows.
Deleting a file sends a copy there. With a retention policy, deleting an item that’s subject to retention copies the original into the Preservation Hold Library. Editing does too, with one exception: new content isn’t copied on its first edit.
New files are caught as well as old ones. It’s easy to assume retention only protects the files that existed when the policy was applied. For retention policies, Microsoft says any new content created or added to the site after it’s included in the policy is also retained. So a file that exists for five minutes and is then deleted still gets kept.
Version limits stop applying. Normally a library trims old versions once it hits its version limit. For items subject to a retention policy, those limits are ignored until the retention period ends, so old versions aren’t purged.
It all counts against your storage. The Preservation Hold Library is included in the site’s storage quota, and Microsoft warns you may need more storage when you use retention for SharePoint (Microsoft Learn: Learn about retention policies and retention labels).
With a seven-year policy, everything that lands in that library stays for seven years. None of this is a bug. It’s retention doing exactly what it’s designed to do. The problem is what AutoCAD feeds into it.
What AutoCAD does every time you save
Saving a drawing in AutoCAD isn’t a simple overwrite. Behind the scenes it shuffles several files around, and most users never see it because AutoCAD hides the extra files.
Backup files. By default, every save creates a .bak file in the same folder as the drawing. It’s an exact copy of the drawing as it was before that save, and only one is kept at a time. The setting is controlled by the ISAVEBAK system variable, and it’s on by default (Autodesk: AutoCAD file types).
Who-has files. While a drawing is open, AutoCAD creates .dwl and .dwl2 files next to it. They’re often called lock files, but they don’t actually lock anything any more. They exist so the WHOHAS command can tell you who has the drawing open, and they’re deleted when the drawing closes.
Put those together and a single save looks roughly like this, based on a detailed breakdown of the AutoCAD save process published by Autodesk partner IMAGINiT (IMAGINiT: AutoCAD file save process explained):
- The existing
.bakfile is renamed to a temporary file. - The
.dwland.dwl2files are deleted. - The current
.dwgis renamed to.bak. - The new drawing is written as the
.dwg. - The temporary file holding the old backup is deleted.
- The
.dwland.dwl2files are recreated.
On a local disk, nobody cares. The old backup disappears, the new one takes its place, and the folder looks the same as it did before. In a synced SharePoint library, every one of those deletes and renames is something the sync client can upload.
Why the two together explode
Now combine the two sets of rules.
The .bak file is a full copy of the drawing. It sits in the synced library, so the sync client uploads it to SharePoint. On the next save, AutoCAD throws that backup away and makes a new one. In SharePoint, that’s a deletion of a file covered by a retention policy, so a full copy of it goes into the Preservation Hold Library, where it stays for seven years.
It doesn’t matter that the backup was only ever meant to be temporary. Retention policies keep new content that’s deleted, not just content that existed when the policy started. Every save that reaches SharePoint can leave another complete copy of the drawing behind.
The .dwl and .dwl2 files add to the pile in a different way. Each one is tiny, but they’re created and deleted every time a drawing is opened, saved and closed. Over years, that’s a huge number of small retained files, which makes the library much harder to browse and report on, even though they add little to its size.
And the drawings themselves aren’t immune. With version limits suspended under the retention policy, every version of every .dwg is kept until the retention period ends.
To see how quickly that adds up, take an illustration. Imagine a 25 MB drawing, saved eight times a day by each of 15 drafters, across 230 working days a year. If every one of those backups reaches SharePoint before it’s replaced, that’s about 690,000 MB, or roughly 670 GB, of discarded backups in a single year, all of it held for seven. Real numbers vary, because the sync client won’t upload every intermediate file, and drawings and save habits differ. But it shows why the growth can be so fast.
Finding out what’s in your Preservation Hold Library
The library is hidden, but its size isn’t. As a site collection administrator, open the site’s Storage Metrics page. In a modern site it’s easiest to go straight to /_layouts/15/storman.aspx on the end of the site address. The Preservation Hold Library shows up in the list with its total size, alongside the normal libraries. If it’s bigger than the libraries people actually use, that’s your first clue.
Size alone doesn’t tell you why, though. To understand what’s driving it, break the contents down by file type. A read-only PnP PowerShell report does the job:
Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/drafting" -ClientId "<app ID>" -Interactive
Get-PnPListItem -List "Preservation Hold Library" -PageSize 2000 -Fields FileLeafRef, File_x0020_Size |
Group-Object { [IO.Path]::GetExtension($_['FileLeafRef']).ToLower() } |
ForEach-Object {
$bytes = ($_.Group | ForEach-Object { [double]$_['File_x0020_Size'] } | Measure-Object -Sum).Sum
[pscustomobject]@{
Extension = $_.Name
Files = $_.Count
SizeGB = [math]::Round($bytes / 1GB, 2)
}
} |
Sort-Object SizeGB -DescendingThis only reads the library. Microsoft is clear that you shouldn’t edit, delete or move files in the Preservation Hold Library yourself. Use compliance tools to work with retained content.
If .bak is at the top of that list by size, with .dwl and .dwl2 near the top by count, you’re looking at the AutoCAD pattern. Then compare the library’s total with the size of the drawings people are actually working on. When the retained copies dwarf the live files, you know where your storage has gone.
Check which policies cover the site
It’s also worth confirming exactly which retention policies apply, because a site can be covered by a policy that targets “all SharePoint sites” without anyone thinking of it as a drafting policy. In Security & Compliance PowerShell, this lists each policy with the SharePoint sites it includes and excludes:
Connect-IPPSSession
Get-RetentionCompliancePolicy -DistributionDetail |
Select-Object Name, Enabled, SharePointLocation, SharePointLocationExceptionA SharePointLocation of All means the policy covers every site, including your drafting sites, unless they appear in the exceptions. Remember that eDiscovery holds use the Preservation Hold Library too, so if a site is under a legal hold, that’s another reason content can’t be released.
Getting the space back
You can’t just delete files from the Preservation Hold Library. While a retention policy applies, that’s not supported, and it would defeat the purpose of retention anyway. Space only comes back when retention no longer applies to those items, so the fix has to happen at the policy level.
The realistic options are:
- Exclude the site from the retention policy, and cover it with something more targeted instead.
- Replace the policy with auto-applied retention labels for that site, which can use a query to decide what’s retained. Microsoft documents excluding whole document libraries from an auto-apply policy with a
NOT(DocumentLink:"<URL to document library>")condition, and the same query approach can target the content you actually need to keep. - Reduce the retention period, if seven years was more than the business or legal requirement actually needed.
Any of these is a records decision, not just a storage one. Check the change with whoever owns your retention requirements before you make it, because removing retention from content that genuinely needs it creates a much bigger problem than a storage bill.
Then be patient. When a site is released from a retention policy, Microsoft keeps retaining its content for a 30-day grace period to prevent accidental data loss (Microsoft Learn: Learn about retention policies and retention labels). After that, a timer job that runs every seven days cleans up the library, and the content goes through the second-stage Recycle Bin, where it’s permanently deleted after 93 days. The storage doesn’t free up overnight.
In our case, around 571 GB of the 665 GB came back once retention for that content had been dealt with and Microsoft’s clean-up process had run its course.
Stopping it happening again
Getting the space back is only half the job. If nothing changes, the library starts filling up again the next morning. There are three places to make changes.
Stop the backups reaching SharePoint
The OneDrive sync client has a policy called Exclude specific kinds of files from being uploaded (EnableODIgnoreListFromGPO), available through Group Policy or the Intune Settings Catalog (Microsoft Learn: Use Group Policy to control OneDrive sync settings). Adding *.bak, *.dwl and *.dwl2 keeps those files on the local disk instead of uploading them, so they never become retained SharePoint content in the first place.
The trade-off is that the .bak files are no longer in SharePoint. That’s usually fine, because SharePoint’s own version history already gives you a way back to earlier copies of the drawing. But check with the drafting team first, because some people rely on renaming a .bak to recover a drawing.
Or stop AutoCAD making them
The more direct option is to turn backups off. Setting ISAVEBAK to 0 stops AutoCAD creating .bak files at all, and Autodesk documents the registry value behind it, IsaveBackupDwg, if you want to deploy it centrally (Autodesk: How to disable creation of BAK files). It’s a bigger change for users, though, so it needs the same conversation with the drafting team. If SharePoint versioning is your recovery path, make sure they know how to use it before you take the backup away.
Design retention with CAD in mind
A blanket retention policy across every site is simple to set up, but it treats a drafting library the same as a finance one. For sites full of large, frequently saved files, a more targeted approach is worth the extra effort: auto-applied retention labels with a query that targets the content you actually need to keep, or a separate policy for those sites with a period that matches the real requirement.
A wider point about AutoCAD and sync
AutoCAD and the OneDrive sync client have never been a comfortable pairing. Autodesk’s community forums are full of sync conflicts, stuck uploads and arguments about .dwl files in synced folders. The storage problem in this article is really just one more symptom of the same mismatch. If your drafting team works heavily out of synced SharePoint libraries, it’s worth reviewing the whole setup with them, not just the retention side.
Checklist: AutoCAD, retention and the Preservation Hold Library
- Check Storage Metrics on any site covered by a retention policy, and compare the Preservation Hold Library with the live libraries.
- Break the library down by file type with a read-only report, and look for
.bak,.dwland.dwl2. - Confirm which retention policies and holds actually cover the site with
Get-RetentionCompliancePolicy -DistributionDetail. - Don’t try to delete files from the Preservation Hold Library directly.
- Fix it at the policy level: exclude the site, switch to targeted retention labels, or adjust the period, with sign-off from whoever owns retention.
- Allow for the 30-day grace period, the weekly timer job and the 93-day recycle bin before the space comes back.
- Exclude
*.bak,*.dwland*.dwl2from OneDrive uploads, or turn off AutoCAD backups withISAVEBAK, after talking to the drafting team. - Design retention for CAD sites separately from general document sites.
Retention policies are one of those controls that are easy to switch on and forget. This one did exactly what it was told: it kept every file that was deleted, for seven years. The lesson for me was that “every file” includes files no human ever chose to save, and some applications create a lot of those.
Sources
- Microsoft Learn: Learn about retention for SharePoint and OneDrive
- Microsoft Learn: Learn about retention policies and retention labels
- Microsoft Learn: Use Group Policy to control OneDrive sync settings
- Autodesk: AutoCAD file types
- Autodesk: How to disable creation of BAK files in AutoCAD
- IMAGINiT: AutoCAD file save process explained in detail

From my early days on the helpdesk through roles as a service desk manager, systems administrator, and network engineer, I’ve spent more than 25 years in the IT world. As I transition into cyber security, my goal is to make tech a little less confusing by sharing what I’ve learned and helping others wherever I can.

