cadblockdwg

How-to guide · how to detach an xref in autocad

How to detach an xref in AutoCAD

DWGDXFFree1,058 words

By Saumyajit Maity · Published 7 Mar 2023 · Updated 28 Feb 2026

An xref — external reference — is another drawing displayed inside your current one, linked rather than copied. Xrefs keep file sizes down and keep a base plan in sync across many sheets, but when you no longer need one, deleting it on screen is not enough. The reference is still recorded in the drawing, still appears in the External References palette, and still leaves its layers behind. To remove it properly you detach it.

Detaching severs the link completely: the referenced geometry disappears and the drawing forgets the xref ever existed. This guide covers detaching the right way, the important difference between detach, unload and simply erasing, and how to clean up the layers and named objects an xref leaves behind. The same workflow applies whether you are stripping a base plan out of a presentation drawing or tidying a block file that picked up a stray reference.

Step 1 — Open the External References palette

Type XREF (or ER, or EXTERNALREFERENCES) and press Enter to open the External References palette. It lists every file attached to the current drawing — xrefs, but also attached images, PDFs and DGNs — with their status, type and saved path. This palette, not the drawing window, is where you manage references.

Find the xref you want to remove in the list. Its status tells you whether it is currently loaded, unloaded or not found. Detaching is done from here, by right-clicking the entry — selecting and deleting the geometry on the canvas does not detach the reference.

Step 2 — Detach the reference

Right-click the xref's name in the palette and choose Detach. The referenced drawing vanishes from your drawing immediately, and the entry disappears from the palette. The link is now completely gone — the host drawing no longer records that file as a reference, and reopening will not try to reload it.

You can detach several at once by selecting multiple entries before right-clicking. Detach is the correct verb when you are finished with a reference for good; it is final but clean, and it is reversible only by re-attaching the file from scratch.

Detach versus unload versus erase

These three are easy to confuse and behave very differently. Detach removes the xref entirely — geometry gone, link gone, palette entry gone. Unload keeps the link but hides the geometry to lighten the session; the xref stays in the palette and you can reload it later, which is ideal for temporarily setting a heavy reference aside without losing it.

Erasing the xref on the canvas (selecting it and pressing Delete) is the trap: it hides the visible geometry but leaves the reference recorded in the drawing, so the palette still lists it and the layers remain. If your goal is to be rid of a reference completely, always detach from the palette — never rely on deleting it in the drawing.

Cleaning up leftover xref layers and named objects

An attached xref brings its layers, linetypes and other named objects into the host drawing, prefixed with the xref name and a vertical bar, like 'BasePlan|Walls'. When you detach the xref, those dependent definitions should drop out automatically. Occasionally a named object lingers — usually because something in the host references it.

If detaching leaves orphaned layers or styles behind, run PURGE to clear unused definitions. PURGE will remove the leftover xref-named layers and linetypes once nothing in the drawing uses them. Run it after detaching as a matter of routine; it keeps the Layer Properties Manager tidy and stops a drawing from accumulating dead references over a project's life.

Detaching when the xref is 'in use'

Sometimes Detach is greyed out or fails because the xref is referenced by something — most commonly it has been nested inside a block, or geometry depends on its layers. If AutoCAD will not let you detach, look for a block that contains the xref reference and address that first, or check for objects sitting on the xref's dependent layers.

If you genuinely need the geometry but not the link, the alternative is to bind the xref (convert it into a permanent part of the drawing) rather than detach it. Bind and detach are opposite intentions: bind keeps the content and drops the link; detach drops both content and link. Choose based on whether you want to keep what the xref was showing.

Good habits with xrefs

Keep your External References palette honest: detach references you have finished with rather than leaving them unloaded indefinitely, so the drawing's reference list reflects reality. Before sending a drawing out, review the palette so you do not ship a file that hunts for a base plan the recipient does not have.

When you detach, follow with PURGE and a quick AUDIT to leave the file clean. And remember the distinction that catches everyone at least once: deleting an xref on screen does nothing to the link. The palette is the single source of truth for what is referenced, and detach there is the only way to truly remove a reference.

Free download

Browse the full library — DWG & DXF, no signup.

Download CAD blocks

Questions

Frequently asked

What does detaching an xref do?+

Detaching removes an external reference completely — the referenced geometry disappears, the link is severed, and the entry is gone from the External References palette. The host drawing no longer records the file as a reference and will not try to reload it.

What is the difference between detach and unload?+

Detach removes the xref entirely and permanently. Unload keeps the link but hides the geometry to lighten the session; the xref stays in the palette and you can reload it later. Use unload to set a reference aside temporarily, detach to remove it for good.

I deleted the xref on screen but it's still in the palette. Why?+

Erasing the visible geometry does not remove the reference — only its display. The link is still recorded in the drawing, so the palette still lists it and the layers remain. Right-click the entry in the External References palette and choose Detach to remove it properly.

Detached an xref but its layers are still there. How do I clear them?+

Run PURGE. After detaching, leftover xref-named layers and linetypes that nothing uses can be purged out. If a layer will not purge, something in the drawing still references it — find and remove or relocate that object, then purge again.

Related downloads

Blocks for this guide

Popular blocks to download

Related categories

Related guides