"Specific" unwiring via timing
A more modern understanding of the classic Hebbian aphorism is spike-timing-dependent plasticity. It is observed that connections are strengthened or weakened according to the relative timing of spiking and inputs. Specifically, synapses that are active shortly before a cell fires an action potential tend to be potentiated ("wire"); synapses that are active shortly after a cell fires an action potential tend to be depressed.
So it isn't just that cells that fire together wire together, it's that cells that fire together in a certain way wire together, and cells that fire together in another way "unwire". I think it's important to recognize that a reduction in synaptic strength doesn't necessarily mean immediate loss of a synapse. Weak synapses are common, and only the very weakest are pruned entirely.
Non-specific unwiring via homeostasis
Another general principle, which may be closer to what you are thinking about, is homeostatic plasticity including synaptic scaling. Just like other physiological processes are under homeostatic control, neurons tend to adjust their responses to maintain an overall activity (firing rate) homeostasis. This process occurs on many different time scales and systems, but stated generally, high levels of activity in neurons tend to activate cellular processes that will reduce future activity, and low levels of activity tend to activate processes that will increase future activity.
Current thinking is that synaptic scaling occurs generally rather than specifically. By increasing the strength of specific synapses via Hebbian plasticity and at the same time slightly decreasing the strength of all synapses, the overall balance of input stays about the same (homeostasis).
Of course, things are a bit more complicated when you look over the whole nervous system and the whole time course of development through adulthood, but I think that's outside the scope of this answer.