If you were able to change a booster rocket engine nozzle's area ratio at will, you would want it to expand, not contract1. Best performance is achieved when the exit plane pressure matches the ambient pressure. As the rocket ascends, the ambient pressure drops, and more expansion is needed, not less.
Why don't they do this? The usual aerospace reasons: cost, weight, and complexity.
A few engines have used extendable exit nozzles. The RL-10B2 has one.

Note that this design allows exit plane pressure matching at two points instead of one, not continuous matching. This graph from Aerothermodynamics of Gas Turbine and Rocket Propulsion (Oates, 1984) shows the advantage of this design. The dashed line is the ideal thrust coefficient. You can see how the solid "actual" line starts to bend away from the ideal line as the vehicle ascends, and then starts trending back for a time when the extendable nozzle is deployed.

The Peacekeeper ICBM had extendable exit cones on its 2nd and 3rd stage solid rocket motors. I am not 100% sure but I believe this drawing (also from Oates) shows one of these motors. The drawing shows two deployable cones allowing exit plane pressure matching at three points.

Extrapolating from this, one could visualize a kind of Venetian blind nozzle with many extendable cones. Visualize, but probably never sell it.
I am sure there are other examples, but "the usual aerospace reasons" keep this from being a common feature.
The "holy grail" of self-adjusting nozzles is the aerospike engine. This uses the aerodynamic properties of the exhaust flow to create a self-adjusting virtual nozzle of sorts. Problems with cooling the centerbodies have so far relegated this to the realm of "will be flying soon" for large engines.
There are a number of informative questions about aerospike engines and expansion/deflection nozzles on this site already.
1Unless you are doing rocket powered landings in the Earth's atmosphere. Clearly a sci-fi concept.