Hello Stan,
This came up as one of my queries a short while ago. It appears to be a surprisingly tricky topic. Have a look back through the archives for the full discussion. Here's the code I came up with. Hope this helps.
Andrew
%======
\version "2.19.82"
% manual staff hiding and showing .
% must be used with \RemoveEmptyStaves on.
hideStaffWithOnlyRests =
\set Staff.keepAliveInterfaces = #'()
showStaffWithOnlyRests =
\set Staff.keepAliveInterfaces = #'(
bass-figure-interface
chord-name-interface
cluster-beacon-interface
fret-diagram-interface
lyric-syllable-interface
note-head-interface
tab-note-head-interface
lyric-interface
percent-repeat-item-interface
percent-repeat-interface
rest-interface
)
%======