Jack in the Box (NASDAQ: JACK) wants to get back basics, so it's getting rid of its Qdoba chain of Mexican eateries.

The company has reached an agreement to sell its more than 700-location chain to Apollo Global Management for $305 million. Proceeds from the transaction, which is expected to close by April, will be used to pay off outstanding debt under its term loan, as required by the terms of its credit facility.

"For the past several months, we have worked closely with our financial advisors and evaluated various strategic alternatives with respect to Qdoba, including a sale or spin-off, as well as opportunities to refranchise company restaurants," said Jack in the Box CEO Lenny Comma in a press release. "...Our board of directors has determined that the sale of Qdoba is the best alternative for enhancing shareholder value and is consistent with the company's desire to transition to a less capital-intensive business model."

What happens next?

When Jack in the Box bought Qdoba it was a small but rising brand with 85 locations in 16 states that did $65 million in systemwide sales. In the 14 years since, it has grown to more than 700 locations in 47 states, the District of Columbia and Canada, with systemwide sales of more than $820 million in fiscal 2017.

That growth, however, has not come without challenges. The fast-casual Mexican space has lost some of its luster in recent years, and rising avocado prices have hurt profits.

Apollo apparently plans to retain the existing management team, though it did not specifically spell that out in the press release.

"We are extremely excited to be acquiring Qdoba and look forward to working with the management team, employees and franchisees to continue building the Qdoba brand," Apollo Senior Partner Lance Milken said. "We are firmly committed to Qdoba's continued growth as a leading fast-casual restaurant operator."

Is this a good deal?

It's hard to know if Jack in the Box is doing the right thing. In the short term, the chain lowers its debt and can fully focus on operating its core business. In the long term, it's likely this transaction will be viewed not by what prices it sold Qdoba for, but what becomes of the chain.

10 stocks we like better than Wal-Mart
When investing geniuses David and Tom Gardner have a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, the Motley Fool Stock Advisor, has tripled the market.*

David and Tom just revealed what they believe are the ten best stocks for investors to buy right now... and Wal-Mart wasn't one of them! That's right -- they think these 10 stocks are even better buys.

Click here to learn about these picks!

*Stock Advisor returns as of December 4, 2017
The author(s) may have a position in any stocks mentioned.

Daniel B. Kline has no position in any of the stocks mentioned.

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.