Photoshop: Ability to remove/purge layers not used in any Layer Comp

  • 11
  • Idea
  • Updated 4 years ago
  • (Edited)
I work extensively with deeply-layered screen-resolution documents (ie. mock-ups). I like to keep my history -- or at least some of it -- of experiments as Layer Comps. But every now and again, these PSDs will get prohibitively heavy.

So what I'm looking for is a command, or script, that will let me purge any layer which is not visible in ANY Layer Comp in the file.

Does such a script exist?
Photo of Rasmus Keldorff

Rasmus Keldorff

  • 4 Posts
  • 2 Reply Likes
  • confident

Posted 8 years ago

  • 11
Photo of lee


  • 25 Posts
  • 7 Reply Likes
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.
Photo of Andrew Betlyon

Andrew Betlyon

  • 1 Post
  • 0 Reply Likes
Really smart. Thanks!