You can remove unused objects, including zero-length geometry and empty text objects, using PURGE. This example steps through how to purge an unused linetype: