Verizon will sell its media group to private equity firm Apollo Global Management for $ 5 billion, the company said on Monday. The sale will allow Verizon to outsource real estate from the previous Internet empires of AOL and Yahoo.

Verizon will retain a 10% stake in the company and it will be renamed Yahoo.

With the sale, online media brands under the Yahoo and AOL umbrella like TechCrunch, Yahoo Finance and Engadget will go to Apollo at much lower ratings than they commanded just a few years ago. Verizon bought AOL for $ 4.4 billion in 2015 and Yahoo two years later for $ 4.5 billion.

Verizon will receive $ 4.25 billion in cash from the sale, along with its 10 percent stake in the company. Verizon and Apollo expect the transaction to close in the second half of 2021.

Recently, there has been increasing evidence that Verizon wanted to sell its media properties and instead focus on its wireless networks and other Internet service providers. Last year Verizon sold HuffPost to BuzzFeed. Recently, other media properties such as Tumblr and Yahoo Answers were also sold or shut down.

Before that, Verizon’s original vision was to turn Yahoo and AOL properties into online media giants that could take over the dominance of Google and Facebook in online advertising. Under the former CEO of AOL, Tim Armstrong, the Yahoo and AOL brands were merged into a new online media division within Verizon called Oath.

For the most part, however, the Oath project did not gain momentum and Armstrong left the company in 2018. Oath was renamed Verizon Media Group again in November 2018 and was led by Guru Gowrappan. Gowrappan will continue to run Yahoo under Apollo.

With the sale of Yahoo and AOL, Verizon signaled that, unlike its competitors, it was no longer interested in media. AT&T is still trying to make WarnerMedia a streaming competitor to Netflix and Disney, despite grappling with a ton of debt from its media acquisitions. Comcast, another Internet provider, is still in the media business with NBCUniversal.

Disclosure: Comcast is the parent company of NBCUniversal, which is owned by CNBC.