Toolbar / Icon: Add-on: QCAD Professional Menu: Layer > Purge Unused Layers Shortcut: Y, P Commands: purgelayers