Just say no.

After a 35-year run in the business, venerable retailer J.C. Penney (NYSE:JCP) has decided selling clothes, not drugs, is what ultimately made it "venerable." It completed the sale of its Eckerd drugstore operations to CVS (NYSE:CVS) and the Jean Coutu Group for $4.5 billion.

It's not difficult to see that a clothing store operating a huge chain of drugstores is a classic example of Peter Lynch's concept of "di-worse-ification" -- that is, diversification so far removed from one's core competency as to weaken the corporation practicing it.

Although most don't realize it, J.C. Penney has had a long history of owning drugstores, beginning in 1969 when it acquired Thrift Drugs. The synergies of no-go growth in department stores with go-go consolidation in discount drugstores in the mid-1990s had Penney on a buying binge, acquiring 200 Rite Aid (NYSE:RAD) stores, the Fay Drugs chain, Eckerd, and Genovese Drugs. It quickly became the No. 3 drugstore chain behind CVS and Walgreen (NYSE:WAG).

Yet too much of a good thing is too much of a good thing. Even as the competition reported rising sales and earnings, Penney was hard-pressed to keep up. And not just with other drugstore chains but also with discounters such as Wal-Mart (NYSE:WMT) and Target (NYSE:TGT), which were able to filter off sales for important front-end items even as pharmacy-related sales grew.

CEO Alan Questrom is in Year Four of a five-year rehab plan. The turnaround specialist said the company will use the proceeds from the sale of Eckerd to pay down $2.3 billion of its $5.1 billion long-term debt while at the same time buying back $3 billion worth of company stock, a move that could reduce its diluted share count by 23%. Those measures, coupled with the elimination of $3.4 billion in lease obligations related to Eckerd, would create an $8 billion improvement in its balance sheet.

It's a move the credit rating agencies have looked upon favorably. Last month, both Moody's (NYSE:MCO) and Fitch Ratings put J.C. Penney on notice for a possible upgrade.

It's been a long, strange trip for the 100-year-old retailer. Sales and profits have improved significantly over the past year as it emerges from its drugstore-induced haze. Yet di-worse-ification, like drug addiction, is something that's easy to fall back into. While investors can and should enjoy Penney's current clear-eyed plans, they ought to keep a watchful eye out for any relapse.

Fool contributor Rich Duprey has been known to enjoy a Coors Light-induced haze. He does not own any of the stocks mentioned in this article.