Purge Unused Layers

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