Thanks to The Lonewolf Librarian via Library Attack for reminding me of this most excellent episode of "The Twilight Zone" from 1961.
In a future totalitarian state, Romney Wordsworth (Burgess Meredith) is a man put on trial for the crime of being "obsolete." Publicly, he's a carpenter. Secretly, he is a librarian (a profession punishable by death, as the State has eliminated literacy). He is prosecuted by the chancellor (Fritz Weaver), who expresses in front of the assembled court that Wordsworth, in not being an asset to the State, shall be liquidated.