KKR stayed on as an investor after Walgreens announced a two-part deal to acquire Alliance Boots in 2012. By the time Walgreens acquired all of Alliance Boots, in 2015, KKR had roughly quadrupled its cash investment, according to media reports at the time.

One of the firms looking at a deal is KKR , the people said. KKR has a history with the retailer. In 2007, it bought Alliance Boots in partnership with Stefano Pessina, then the executive chairman of Alliance Boots, and other investors.

International drugstore chain Walgreens Boots Alliance is exploring going private in what could mark the largest leveraged buyout in history, people familiar with the situation told CNBC.

For Walgreens Boots Alliance a deal to go private would be a chance to get out of the public spotlight. Shares of Walgreens have slid about 22% over the past 12 months as both its retail and pharmacy businesses are under pressure.

With Walgreens' market capitalization at roughly $55 billion, such a deal would require a big paycheck. Pessina, now Walgreens CEO, has a roughly 16% stake in the company, according to data compiled by FactSet. He could roll over that stake to help facilitate a deal.

Walgreens' outstanding debt load, roughly $17 billion, according to its most recent regulatory filing, may further complicate acquisition talks. A number of deals to buy retailers led by private equity firms in recent years have resulted in bankruptcy, including Toys R Us and Payless. Those retailers found themselves hamstrung by debt and unable to make the investments necessary to compete amid a rapidly changing retail landscape.

Walgreens — one of the world's largest pharmacies, with roughly 9,300 drugstores — is under its own pressure. Consumers are increasingly shopping for drugstore staples such as shampoo and vitamins online. Insurers are squeezing pharmacies, paying them less to fill prescriptions.

In response, Walgreens is slashing costs. The company aims to trim more than $1.8 billion by fiscal year 2022. Walgreens earlier this year said it will close about 200 stores in the U.S., in addition to the 200 it will close in the U.K.

Amid challenges facing the industry, Walgreens' peers have explored partnerships or consolidation. CVS Health and Aetna last year combined in a roughly $69 billion deal that combined CVS' pharmacy and pharmacy benefits manager platform with Aetna's insurance business.

Walgreens explored a deal to buy AmerisourceBergen last year, but those early-stage explorations ended without an agreement.

In 2015, Walgreens attempted to acquire Rite Aid in a $17.5 billion deal that looked to bring with it 4,600 stores. Regulators, though, whittled the deal down to a purchase of 1,932 stores for $4.37 billion.

Walgreens is working with investment bank Evercore to explore whether it can put together a deal, Reuters reported earlier Tuesday. Reuters and Bloomberg earlier reported news of a potential deal, sending shares up more than 3%.

Shares closed Tuesday at $61.21, up 2.6%.

Walgreens declined to comment Tuesday, saying it does not comment on rumors or speculation.