SAN FRANCISCO — McAfee, once one of the household names in computer security software, is poised to become an independent business once more.

Intel, which bought McAfee for $7.7 billion six years ago, said on Wednesday that it had sold a majority stake in its cybersecurity business to the investment firm TPG, in a transaction valuing the security provider at approximately $4.2 billion, including debt.

The move will bring McAfee independence at a time when cybersecurity businesses have grown more prominent amid seemingly omnipresent hacking threats. And its sale illustrates how much both the technology industry and Intel have changed since Intel purchased the company in 2010.

Then, much of computer security was centered on protecting personal computers hard wired to corporate and personal networks. The explosion of smartphones, tablets and laptops, all wirelessly connected to cloud computing systems, has changed the industry. PC sales have shrunk for five years, too, changing Intel’s business plans.