“You know what I’m going to devote the rest of my life to?” David Letterman said on his last night as the host of the “Late Show” on CBS. “Social media.”

Mr. Letterman ended his 33-year career in late night on Wednesday as he had started it — with the irreverence, self-mockery and mischief that made him such an iconoclastic talk-show host.

His farewell was much better than the usual mawkish television send-off: He mixed favorite segments like his Top 10 list with clips of classic skits and a few restrained fillips of sincerity and humility. His final show was not at all like the Pharaonic and mushy last bow Johnny Carson took when he left “The Tonight Show” in 1992. As could be expected, it was a bracing antidote to the weepy extravaganza that ushered his rival Jay Leno into retirement last year.

Mr. Letterman’s retirement has gotten an extraordinary amount of focus — a frenzied outpouring of fan devotion, celebrity tributes and nonstop media attention — perhaps because he was so important to the last generation of viewers who grew up watching shows on a television set, and not on a smartphone.