Register now or log in to join your professional community.
The quickest way to remove unused layers is by using the PURGE command. This will search for all layers that are empty and unreferenced anywhere in the drawing.
If you have additional layers that have no objects on them, but you cannot delete them, this may be because they are referenced in a block definition or a style (this is often the case in Civil3D, AutoCAD Mechanical, and other AutoCAD-based versions). While best practices would certainly recommend being aware of the layers used by blocks and styles, after a careful check of these same items, you may still wish to forcibly delete a layer.
This action can be done by using the command LAYDEL. It will delete a layer, even if it’s referenced or in use. But beware: this means that it will remove any objects that are on that layer or require that layer
The layers can be removed only when the object resides in the layers will be removed, once it is removed it is an empty layer. The empty layers cannot be deleted by purge. It might be because the layer is frozen on a viewport or referenced by an object in a block definition. By using EXPORT command it is possible to remove the layer from drawing, which results in creating a DXF file of the drawing. You can edit the dxf file in a text editor and rename all the instances of layers in the file, except the layer definition.
By purging the file you can remove the empty layer.
If you want delete the used layer just type the command laydel and select the layer which you want to delete.