A new option has been added to the categorized symbol widget to allow users to bulk remove unused categories.
Using this option will automatically identify and remove any categories which are not matched in the attribute field or expression used to categorize the layer.
This is especially useful when utilizing a clipped subset of data that inherited a large set of categorized styles.
This feature was developed by Ben Wirf