Urban Outfitters has a record department (as in, vinyl):
There are still occasional new releases to VHS:
For my purposes, a format is dead when libraries do not accept that format as donations to a Friends of the Library (Book) Sale. Cassettes, vinyl, 8 track and VHS are dead. Books (other than textbooks and encyclopedia, reader's digest condensed books, magazines), CDs and DVDs are NOT dead.
So when do CDs die?
VCRs that used VHS were introduced in the mid 1970s: let's call it 1976. (I remember seeing contemporary Der Spiegel ads for them years later when doing unrelated research, but I also remember babysitting at a house that had an unusually ancient VCR from 1978, IIRC; I would have seen it in 1984 or thereabouts.) Libraries were refusing to accept VHS donations sometime after 2000, let's call it 30 years later.
Music cassettes predated VHS by about 10 years; let's call it 1966. I think libraries had largely switched over to CDs before 2000.
The LP (which we know as "vinyl" or a "record") was introduced in the late 1940s. It's a little trickier to identify its "death" for library donation purposes. I'm going to assert that happened around the same time as music cassettes, because the driving factor was ability to replace classical music collections with CDs.
The 8 track is even trickier to nail down, partly because libraries did not collect them extensively (and things are further complicated by their limited success as a format). But [edited to correct, thanks to Nate] 8 tracks were definitely being dumped at garage sales in the mid-1980s, so its run would have been from the mid-1960s to the mid-1980s at the most optimistic.
So a format's lifetime (for my purposes) can be estimated at between 20 and 40 years. A rabidly successful format, like LPs, which enjoy international penetration from the very youngest customer to the oldest, from the most passing fad in music, to the most enduring classics, might make it 40 years for my purposes (remember: the metric is will a library take it to sell to raise money at a friends book sale). A less successful format, like Betamax, Laserdisc or 8 track, will be over and done in 20 years.
CDs are clearly in the Rabidly Successful category. Equally clearly, they're well into their long run, however long it may ultimately prove to be. When will libraries turn down CDs?
Assuming a start date of 1982 and a 40 year run, we could predict that CDs will be refused by friends sales at libraries in 2022. We could imagine several scenarios that might lead to this.
(1) Friends sales cease to exist because libraries disappear. I don't think that's going to happen.
(2) Friends sales become bake sales and DVD sales, auctions for experiences at local tourist areas or for highly desirable consumer items donated by local shops, etc. All this because far more people in the community are unloading CDs on the friends than they can then sell back to people in the community (because most people have switched to digital formats) or give to charities.
The second one is tricky, because of the distant market phenomenon. No one in the area may want our books or CDs, but maybe in some rural community a thousand (or ten thousand) miles away, they do want those books or CDs. As long as someone is willing to pay a nominal amount of money and then remove the goods, friends sales will likely accept the format. (In part because friends sales exist to serve as a middle-class guilt reduction tool. Increasingly they have competition in providing this service from those bins that you can dump clothes, shoes, books, etc. into.) The trick lies in predicting when everyone loses interest, even in the most distant markets, and that happens when it's cheaper and more practical for distant markets to switch to the new format and abandon the old one.
That is a tough call.
The other way to think about this is as a balancing act. There are still lots of people locally who are buying new CDs (I know, seems improbable. But it is still true.). I myself just pre-ordered Frog Trouble by Sandra Boynton, which is a book and CD set. I wish I hadn't, but there it is (and I am not going to un-order it, because I want it).
I had thought, as I started the iTunes Match project that I was incredibly late to the game: Match had been available for a couple of years. People had been using digital lockers for more years. I myself had started ripping my CDs _ten years earlier_. However, the expense of digital storage (and the hassle of managing it) and the expense of shipping bits longer distances has only recently come down to a point to make CDs stop looking like a high density format and start looking like a stupid waste of plastic. I am not late to the game. I'm just a second rank sheep the way I always am.
So based on all of that (and a little lick-finger-stick-in-wind), I'll predict the following. Sometimes around or after 2015, there will be a news story that becomes increasingly pervasive until we're all sick of it: OMG, major music release that you cannot get on CD! (And there will likely be a paragraph in some of them about how you can get it on vinyl. Take _that_ CD format!) There will be stories about people having to have their friend burn a copy for them from the digital release. We will all mostly not care.
And by 2022, libraries will start telling us that the friends sale isn't accepting music CDs anymore, but they will still accept audiobooks on CD.
DVD will be around for a while longer.
ETA: Here is a 2007 lifehacker article which illustrates why the switch to digital music did not happen earlier.
Everything is here: DRM issues (which I don't mention because they are basically gone), backup issues (again, dealt with by digital lockers/matching services), incompatibility issues (again, resolved). There are now digital booklets to replace liner notes and we're up to 256 for downloadable tracks, which isn't as good as CDs, but isn't that far off, either. Also, CDs still get dinged, and jewel cases are still Evil.
ETAYA: Another way to think about CDs is that they started dying around 2000, and the real problem is that there hasn't been an appropriate replacement yet. Once we get an appropriate replacement, The World Changes. Incrementalling our way to that replacement (removing DRM, providing a digital booklet, etc.) is unusually hard, because it is not only a format change, it's a p- to v- change.