Last updated July 28, 2026
This routine erases every piece of text in the drawing. Not the text you select — all of it, everywhere, in one keystroke, with no confirmation and no chance to change your mind before it happens.
That is exactly what it says on the tin, and there are real jobs where it is what you want. But it is worth being blunt about the behaviour up front, because the command is short, easy to type by accident, and gives you no warning.
What it actually does
The routine builds a selection of every TEXT entity in the drawing database and erases the lot. Three consequences follow from how that selection is made, and none of them is obvious from the description.
- Frozen and switched-off layers are included. The selection works on the drawing database rather than on what you can see, so text you have deliberately hidden is erased along with everything else.
- Layouts are included. Text in paper space goes as well as text in model space. Title block annotation that is plain text rather than attributes will disappear.
- Mtext survives. The filter asks for TEXT specifically, and multiline text is a different object type. So you get a drawing stripped of single-line text with all its paragraph text still in place — which is either exactly what you wanted or a confusing half-result, depending on the job.
If there is no text at all it tells you so and stops. That is the only message it produces.
When this is the right tool
Stripping a drawing you have been given so you can reuse the geometry without inheriting somebody else’s annotation. Preparing a background drawing for xref use where you want the linework and none of the labelling. Clearing out a drawing before re-annotating it to a new standard.
In each of those cases the alternative is a crossing window over the whole drawing plus a filter, which is more clicks for the same result. That is the value here.
What it is not is a general cleanup tool. Because it uses AutoCAD’s ERASE command rather than a lower-level delete, an immediate U will bring everything back — but only if you notice straight away. Run it, save, close, and the text is gone.
Command reference
The command is DELTEXT, which is worth noting because neither the file name nor the listing title says so. The file is called “Delete text.lsp” and the listing calls it Delete All Text, but what you type is DELTEXT.
Given what it does, the name is arguably too close to something you might type meaning to delete one piece of text. If you keep it loaded, consider renaming the command in the file to something you could not reach by accident.
How to load it
Unzip the download and load the .lsp file with APPLOAD. Our advice would be to load it when you need it rather than putting it in the Startup Suite — a command that erases every label in the drawing is not one you want quietly available in every session. Our AutoLISP guide covers loading.
Step-by-step usage
- Save your drawing, or work on a copy. This is not a step to skip.
- Type DELTEXT.
- All single-line text is erased immediately. There is no selection step and no confirmation.
- Check your layouts and your frozen layers, since those were included too.
- If it was a mistake, type U straight away.
Compatibility notes
Six lines of the most basic AutoLISP there is, driving AutoCAD’s own ERASE command. Nothing in it is version-specific and there is nothing to break.
No dialog boxes and no Express Tools calls, so nothing requires the full product; LT users on LT 2024 or later, the release that brought AutoLISP to LT, should be able to run it. See what runs on AutoCAD LT. If you want it to catch mtext as well, the filter is a single word in the file and adding a second entity type is a small edit.
Download
| Name: | Delete All Text |
| Description: | Erase all text in a drawing. |
| Type: | AutoCAD AutoLISP Routine |
| Author: | Anon |
| File Size: | 1 Kb |
| Cost: | Free |
| Worked on: | AutoCAD |
| Download File: | Delete text.zip |
Related routines
- Delete Layer — the same idea aimed at a layer rather than an object type.
- CHT — restyle text rather than removing it.
- Best of LISP collection — more drawing clean-up utilities.