Campbell Soup Co. has reached an agreement to sell Bolthouse Farms for $510 million, the California carrot and refrigerated beverage producer that it bought in 2012 for $1.55 billion.

The sale completes the plan announced in August to unwind the Campbell Fresh division as part of the company’s plan to narrow its focus and reduce debt. The plan, announced under pressure from activist investor Dan Loeb, also calls for the sale of international operations, including Arnott’s biscuits in Australia.

Bolthouse was the cornerstone of then-chief executive Denise Morrison’s bid to steer the Camden company into a future of fresher foods, which were supposed to offer faster growth than Campbell’s soups and other products sold in the ever-shrinking center aisles of supermarkets.

But Bolthouse faltered under Campbell stewardship, which included a decision in 2016 to harvest smaller-than-normal carrots, causing dissatisfied customers to bolt for other suppliers.

Other components of the so-called Campbell Fresh unit also failed to deliver. Last month, Campbell disclosed that it had received a total of $60 million for a Michigan salsa company it bought for $232 million in 2015 and a refrigerated soup plant it opened at a cost of $80 million in 2007.

Campbell had already written off more than $1.4 billion from the value of businesses it had acquired for $2.4 billion from 2012 through 2015 under Morrison. The bulk of those write-offs were on Bolthouse.

In the fiscal year ended last summer, the Campbell Fresh operations had $970 million in revenue. Proceeds from the sales will allow Campbell to trim $570 million from its $9.46 billion in short- and long-term debt. Two-thirds of that debt came from the acquisition last year of Snyder’s-Lance Inc. for $6 billion.

Bolthouse’s buyer is Butterfly Equity, a Los Angeles private equity firm making investments in agriculture, aquaculture, food and beverage products, food distribution, and food service.

The deal gives Jeff Dunn, who is sometimes credited with playing a key role in popularizing baby carrots as a snack food, a second chance at the Bolthouse helm. Dunn was the company’s chief executive from 2008 through 2012, when Campbell bought it. He remained at Campbell for four years.

“Bolthouse Farms holds a special place in the produce industry, and my team and I are deeply committed to strengthening and broadening Bolthouse Farms’ unique legacy,” Dunn said in a news release from Butterfly. “We can’t wait to get started.”

Bolthouse has 2,200 employees. Campbell had 23,000 employees last summer, according to its annual report.