Skip to main content
Inspiring
Sep 9, 2011 7:28 PM UTC
Open for Voting

Photoshop: Delete all unused layers in ALL layer comps feature.

Delete all unused layers in ALL layer comps. Right now hitting delete all unused layers messes up a file with more than 1 layer comp. Personally I use like 20 layer comps each PSD - this feature would help immensely in trimming file size down and cleaning up if handing the file off.

16 replies

Inspiring
Apr 11, 2019 10:00 PM UTC
Good news everyone! I created script for removing layers not used in any layer comp. Download here: https://bereza.cz/ps/

  • Locked layers are skipped (unlike built-in feature Layer > Delete > Hidden Layers)
  • Works with and without layer compositions
  • Super fast. Thousands of layers in few seconds. Should be much faster than any other scripts.
  • Also handles clipped layers



Translate
Inspiring
Jun 12, 2018 12:32 AM UTC
actually if you click the hamburger menu on the Filter part, there is a "Delete Hidden Layers" option.  I created an Action using it! Finding out about the Attribute Filter was fantastic though! Thanks!
Translate
Inspiring
Apr 7, 2016 4:51 PM UTC
Thank you so very much!
Translate
Known Participant
Jan 14, 2016 2:26 AM UTC
Just tried your trick and it works great.
Still want the simple menu command but until then this will do :)
Thanks for the tip!
Translate
Inspiring
Jan 13, 2016 5:37 PM UTC
Same (20 or more layer comps). That's why I'm such a keyboard ninja with them. So still this doesn't take long. Still still, a native solution like you suggest would be nice.
Translate
Known Participant
Jan 12, 2016 11:32 PM UTC
Good point but I often have documents with 20 or more layer comps. Makes the process pretty tedious. I think that a simple "delete unused layers" would be easy enough to hook up to the layer dropdown menu. :)
Cheers.
Translate
Known Participant
Jan 12, 2016 11:14 PM UTC


Would love to have the ability, in the layer dropdown menu, to delete empty layers (no pixels) and also delete unused layers. The unused layers would be based on whether the layers are used in any layer comps. (love layer comps BTW).
Translate
Inspiring
Jan 2, 2015 9:59 PM UTC
Scripts scare me, so I found a really freaking easy workaround:

1. Filter layers list to Attribute = Not Visible
2. Select all the matching layers
3. Cycle through all layer comps
4. Layers still selected aren’t used in any layer comp

Delete the layers that are still selected. Bingo bango. With keyboard shortcuts for navigating layer comps, this takes like 7 seconds or something.
Translate
Inspiring
Dec 19, 2014 8:30 PM UTC
thanks a lot.. it worked perfectly 🙂
Translate
Legend
Nov 2, 2013 12:02 PM UTC
Cool! Thanks Paul.
Translate