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.