Take this example: The UI features a list view with many buttons/options at the top where some are active and others inactive.
Buttons or options that depend on a selection (e.g. "Delete") can surely be hidden. The result will be a much simpler UI. This works best if you have given the user the chance to learn where those soon-to-be-active buttons will appear, e.g. next to one button/option that is always active.
Hide or not to hide, this is the question. Often it depends but generally: Simplicity is the goal.