How to Reduce AutoCAD File Size with PURGE – Step-by-Step Guide
To reduce your AutoCAD file size with PURGE, type PU, select Purge All including nested and orphaned items, and run it two to three times. Then remove RegApps via -PURGE, clean duplicate lines with OVERKILL, and rewrite the file with WBLOCK for the smallest result.
With PURGE you remove unused definitions, making your DWG smaller and quicker to open.
An AutoCAD drawing stores not just the visible lines, but also a database of named objects: layers, blocks, linetypes, text styles, dimension styles and more. When you delete geometry, those definitions often remain. PURGE cleans out the definitions that are no longer used. The result is a smaller file, a tidier layer and block list, and better performance.
You start the command by typing PURGE (shortcut PU) and pressing Enter. A dialogue box appears with a tree view of everything you can clean up. A file that has passed through many hands often collects dozens of unused layers and blocks; a single cleanup session can noticeably shrink the file size and speed up opening.
Command: PU
PURGE
Important beforehand: save a copy of your file first. PURGE is designed to remove unused data, but a backup prevents you from losing something you might still need. Set the system variable FILEDIA to 1 if the dialogue box doesn’t appear; at 0 PURGE runs entirely on the command line.
In the PURGE window, choose Purge All and tick nested items for a thorough clean-up.
The dialogue box shows at the top the option "View items you can purge". Under the tree are three important choices:
- Purge nested items: also removes definitions that are only freed after another item is purged, for example a linetype that only existed in an unused block. You'll usually want to tick this.
- Purge orphaned data: cleans up loose database entries, including the notorious DGN linetypes left behind after an import from MicroStation.
- Purge zero-length geometry and empty text objects: removes zero-length lines and empty text objects you never see but that still count.
Click Purge All to clean up in one go. Because purging one item sometimes releases another, it's wise to run PURGE two or three times in a row until nothing remains.
The tree shows per category what you can remove. The most common are:
- Blocks: block definitions no longer referenced in the drawing.
- Layers: empty layers without geometry. Layer 0 and Defpoints cannot be removed.
- Linetypes: loaded linetypes that are not used anywhere.
- Text and dimension styles: styles without associated objects. The Standard style always remains.
- Multileader styles, table styles and material definitions: unused formatting definitions.
If a category shows no plus sign, there is nothing to purge. Items that stay grey after Purge All are still in use; delete the corresponding geometry first before purging again.
The biggest invisible clutter is often in RegApps, which you can only remove using the command-line version.
RegApps (registered application IDs) are references to programs that once added data to the drawing. They accumulate through external references and imports and can massively bloat a file. The ordinary dialogue box doesn't always show them; therefore use the command-line version with a hyphen in front:
Command: -PURGE
Enter type of unused objects to purge
[Blocks/DEtail.../Regapps/...]: R
Enter name(s) to purge <*>: *
Verify each name to be purged? [Yes/No] <Y>: N
Choose Regapps, confirm with an asterisk for all, and set verification to No. In drawings that have processed many xrefs or copied content, you may see a considerable drop in file size after this.
RegApps grow especially when you repeatedly copy blocks or whole drawing sections between files. Each source brings its own application IDs. Because AutoCAD doesn't automatically clean them up during the normal Purge All, they keep counting. So run -PURGE RegApps as a fixed step for files that open slowly or are inexplicably large, and repeat the command until the count stops dropping.
OVERKILL removes duplicate and overlapping geometry that PURGE doesn't touch.
PURGE only cleans up unused definitions, not visible lines. Duplicate lines that lie exactly on top of each other, or polylines with redundant vertices, remain and slow down regen. That's what OVERKILL is for:
- Select all geometry, for example with Ctrl+A.
- Type OVERKILL and press Enter.
- In the dialogue box, leave tolerance at 0 unless you want to deliberately merge nearly identical lines.
- Tick "Optimise segments within polylines" and confirm with OK.
AutoCAD reports how many objects were deleted or merged. On drawings that have been overdrawn often, this noticeably improves responsiveness.
In the OVERKILL window, under "Ignore object properties", you decide whether lines on different layers or with different colours count as duplicates. If you only want to merge truly identical geometry, leave those boxes unticked. If you want a more aggressive clean-up, tick Layer and Colour, for instance, so AutoCAD also removes overlapping lines with differing properties. Be careful here: geometry deliberately placed on different layers should not be accidentally merged.
Run AUDIT before cleaning so database errors don't block your purge.
A drawing with database errors sometimes cannot be fully cleaned. The AUDIT command checks the drawing and repairs found errors:
Command: AUDIT
Fix any errors detected? [Yes/No] <N>: Y
AUDIT doesn't make the file smaller, but it restores integrity so PURGE can do its job. If a damaged file won't open at all, use RECOVER via the menu (Application menu > Drawing Utilities > Recover). RECOVER force-opens the file and repairs it along the way. If your software freezes or becomes sluggish during this, also have a look at the causes in our overview about why AutoCAD is slow or crashes.
To see whether a clean-up had an effect, check the file size in File Explorer before and after, or use the STATUS command for an overview of objects in memory. If you notice a lot of clutter consistently across a set of drawings, you can also run AUDIT and PURGE on multiple DWGs simultaneously via a script file, so you don't have to open each file manually.
If a file remains stubbornly large, rewrite it completely with WBLOCK.
Sometimes the file size doesn't drop despite purging, usually because the database has become internally fragmented after years of editing. Then the WBLOCK trick helps, which copies the drawing to a new, clean database file and reorganises its structure:
- Type WBLOCK and press Enter.
- Under Source, choose the option Entire drawing.
- Specify a new file name and location and click OK.
The new file contains only the actually used data and often leaves a lot of clutter behind. Continue working in that new file. An alternative is Save As (SAVEAS) to a fresh DWG, which also writes the database more compactly.
When sharing drawings with others, use eTransmit (command ETRANSMIT). It packages the drawing with its xrefs and fonts in one go and is the ideal moment to send a cleaned-up set.
A DWG becomes unnecessarily large due to proxy objects, embedded images, and DGN linetypes.
Knowing where the size comes from helps you clean up purposefully. The most common causes:
| Command or setting | What it cleans up | Effect on size |
|---|---|---|
| PURGE / -PURGE | Unused layers, blocks, linetypes, styles | Smaller |
| -PURGE Regapps | Registered application IDs | Sometimes much smaller |
| OVERKILL | Duplicate and overlapping geometry | Slightly smaller |
| AUDIT | Database errors | None, restores integrity |
| WBLOCK entire drawing | All unused clutter | Often significantly smaller |
| PROXYGRAPHICS set to 0 | Preview images of proxy objects | Smaller with AEC content |
Proxy objects appear when objects from vertical products like Civil 3D or AutoCAD Architecture end up in plain AutoCAD. Set PROXYGRAPHICS to 0 to not save the stored preview images. Detach embedded or unused images via the External References palette (XREF), and remove DGN linetypes with the orphaned data option in PURGE.
Also watch out for these size culprits that PURGE doesn't fix:
- Large hatches: a hatch with a minuscule scale generates a huge number of lines. Check the scale or replace solid hatches with a solid fill.
- Embedded OLE objects: a pasted Excel table or image as an OLE object weighs heavily. Replace it with a text reference or an xref.
- Bound xrefs: when you insert an xref with Bind, you copy its entire content plus all definitions into the drawing. Consider keeping xrefs as overlays instead of binding them.
If you don't know where the size comes from, save the file as DXF and back as DWG. In the DXF format, you can sometimes see by the file structure which category takes up the most space.
A reliable clean-up follows a fixed order: backup, AUDIT, PURGE, OVERKILL, rewrite.
Combine the commands in this order for the best result without risk:
- Save a copy under a new name.
- Run AUDIT with fix errors set to Yes.
- Run PURGE with Purge All, including nested and orphaned items, two to three times.
- Run -PURGE Regapps via the command line.
- Select all and run OVERKILL.
- Rewrite the file with WBLOCK entire drawing or Save As.
For the exact steps per version, the Autodesk guide on reducing DWG file size describes each option. If, besides file size, you encounter other stubborn AutoCAD problems, such as your AutoCAD licence won't activate, it's best to tackle those separately with a targeted approach.
Frequently asked questions
The shortcut for PURGE is PU followed by Enter. This opens the dialog box with all purgeable items. For the command-line version, which also removes RegApps, type -PURGE with a hyphen in front. Both versions only delete definitions that are no longer used.
PURGE only removes unused definitions, not visible or duplicate geometry. If the file remains large, run OVERKILL for duplicate lines, remove RegApps with -PURGE, and rewrite the drawing using WBLOCK entire drawing. That last step often makes the biggest reduction.
PURGE only removes definitions that are no longer used, so you won't lose any visible geometry. Still, it's wise to save a copy first. That way you can revert if you later need a purged layer, block, or style.
RegApps are registered application IDs, references to programs that once added data to the drawing. They accumulate through xrefs and imports and can significantly bloat a file. You remove them using -PURGE and the Regapps option on the command line.
Run AUDIT with error recovery set to Yes before you purge. Database errors can block the clean-up. AUDIT doesn't reduce the file size but restores integrity so that PURGE, OVERKILL, and rewriting can all do their jobs completely.
Related articles
Daan has been working with AutoCAD, Revit, and Civil 3D in the construction and installation sector for over ten years, helping designers make their drawings faster and error-free.
View profile