TV station owners Tegna and Tribune Media are counting cash — and some losses — this morning after agreeing to sell the bulk of their stakes in job site CareerBuilder to an investor group led by Apollo Global Management and the Ontario Teachers’ Pension Plan Board.

Tegna, which was the majority owner, said in September that it was looking for a buyer.

The station owner, formerly part of Gannett, says it expects to collect $250 million after the deal to take its stake in CareerBuilder down from 53% to 12.5%. It will use the cash to “retire existing debt and for other general corporate purposes,” it says.

Tribune says that it should see $157 million after selling down its stake to 8% from 32%. It will also have to take a $64 million impairment charge in Q2 — reflecting the drop in CareerBuilder’s value since Tribune bought in — with a $22 million tax benefit from the loss.

In Q1 Tribune took a $122 million writedown on CareerBuilder.

Sinclair Broadcast Group said that if its $3.9 billion agreement to buy Tribune Media is consummated then it probably would sell the CareerBuilder stake.

Apollo Senior Partner David Sambur lauded CareerBuilder’s “iconic brand.” The investment company plans to “support the Company’s continued growth and innovation.”

Under Tegna, CareerBuilder has tried to shift its focus from ad sales to licensed software. Last year it bought background screening and drug testing company Aurico, which employers can use to check out potential hires. It also bought 75% of Workterra, a benefits administration platform.