Negative Shelling

I frequently need to create solid Y from solid X where

Y = X - SHELL (X, some-small-value)

This runs into many problems. For example, shelling X often does not create a sold.

Is there some simple or reliable way to create such negative shelling that I should be using?