The Twilight Zone: Season 2, Episode 29
In a future state where religion and books have been banned, a librarian is judged obsolete and sentenced to death.