Why: To quickly remove non-visible layers.
What: Delete Non-Visible searches layers and layer groups (in Photoshop) to find any non-visible layers and deletes them.
How: Open a layered PSD file and run the Delete Non-Visible script.
Using the Script:
When you are finished creating a layout, run Delete Non-Visible. A dialog box will appear, asking if you are sure you want to proceed.
Choose 'OK' and Delete Non-Visible will remove any layers that have the visibility set to off.