chore: remove unused transitive dependency subtrees (#27957)