The AutoCAD
PURGE Command
Learn how to remove unused definitions like layers, blocks, and linetypes to keep your drawings clean, small, and efficient.
What Is PURGE?
Every AutoCAD drawing stores named object definitions: layers, blocks, dimension styles, text styles, linetypes, and more. Over time, many of these definitions become unused: no geometry references them, yet they remain in the file.
The PURGE command scans your drawing's definition tables, identifies entries that have zero references, and lets you delete them safely.
Why Unused Definitions Accumulate
What Can Be Purged?
PURGE can clean layers, blocks, linetypes, dimension styles, text styles, table styles, multileader styles, materials, visual styles, and registered applications: essentially any named definition with zero references.
How PURGE Decides What to Remove
Dialog vs. Command Line
| PURGE (Dialog) | -PURGE (Command Line) | |
|---|---|---|
| Invocation | Type PURGE | Type -PURGE (with hyphen) |
| Interface | Visual tree with checkboxes | Text prompts only |
| Selective? | Pick individual items | By category or all |
| Best For | First-time users, review | Scripts, batch processing |
| Preview | Shows block thumbnail | No preview |
PURGE vs. DELETE vs. ERASE
What Cannot Be Purged
How to Apply PURGE: Step by Step
Example 1: Basic Purge
You receive a drawing with 47 layers, but only 12 contain objects. The remaining 35 are empty.
Command: PURGE
; Step 2: dialog opens, shows 35 unreferenced layers
✓ Select All → click Purge All
; Result: 35 layers removed
Example 2: Nested Block Cleanup
Example 3: Command-Line Batch Purge
For scripting or batch processing, use the -PURGE (hyphen) variant. This avoids the dialog entirely.
Command: -PURGE
Enter an option [All/Blocks/...]: A
Enter name(s) to purge <*>: *
Verify each name to be purged? [Yes/No] <Y>: N
; All unreferenced definitions are removed.
Anatomy of the PURGE Dialog
Real-World File Size Impact
Common Mistakes
Summary Reference Table
| Topic | Key Detail |
|---|---|
| Command | PURGE (dialog) or -PURGE (CLI) |
| What It Removes | Layers, blocks, linetypes, styles with 0 references |
| Protected Items | Layer 0, Defpoints, Continuous, Standard style, current items |
| Run Frequency | 2-3 times (nested items) or enable "Purge nested" |
| Companion Commands | AUDIT, WBLOCK, OVERKILL |
| Scripting | -PURGE A * N |
Question 1 of 5
What does the PURGE command remove from an AutoCAD drawing?
Question 2 of 5
Which of the following can never be purged?
Question 3 of 5
Why is it recommended to run PURGE multiple times?
Question 4 of 5
How do you invoke the command-line version of PURGE (bypassing the dialog)?
Question 5 of 5
You erased all objects on layer "TEMP-SKETCH." After saving, the layer still appears in the layer list. What should you do?