Depletion of solar wind plasma near a planetary boundary