For a very long time, even as the legend of his investing prowess grew to mythic proportions, Warren Buffett refused to take positions in tech companies out of a belief that their future cash flows are -- due to the sector's dynamism -- too hard to project.

But gradually, the Oracle of Omaha has softened his stance on tech a bit, opening up sizable positions in IBM (IBM)  and Apple (AAPL)  and also taking less-publicized stakes in some smaller tech firms.

However, it wouldn't be fair to say that Buffett has completely abandoned his old stance on tech: His investments in the space have skewed towards well-established businesses that (on the surface at least) could be trusted to deliver strong cash flows for years to come. And by recently upping his stake in Apple and nearly liquidating his position in IBM, Buffett's tech portfolio now bears an even stronger resemblance to his non-tech portfolio.

Ahead of the Feb. 24 release of Buffett's annual letter to Berkshire Hathaway  (BRK.A) shareholders, Berkshire disclosed in its Q4 Form 13-F filing that it had slashed its IBM position by 35 million shares last quarter to a mere two million. The conglomerate also disclosed its Apple position had been upped to 165.3 million shares (current value of $29 billion) from 134.1 million. That amounts to a 3.25% ownership stake in Apple, according to FactSet.

Positions in two other tech firms -- domain name registrar Verisign  (VRSN) and insurance risk analytics firm Verisk Analytics (VRSK)  -- were unchanged at 13 million and 1.6 million shares, respectively.

Buffett originally disclosed a $10.7 billion position in IBM back in November 2011. Even after accounting for substantial dividend payments, Big Blue's shares only delivered a 4% return from Sep. 2011 to the end of 2017. The S&P 500, meanwhile, more than doubled over that time.

The near-liquidation of the IBM position came before the IT giant (though beating Q4 estimates) issued slightly below-consensus 2018 EPS guidance on its January earnings call, and forecast its free cash flow (FCF) would drop by $1 billion this year to roughly $12 billion. As it is, IBM's FCF had fallen sharply from a 2012 peak of $18.2 billion, something that doubtlessly wasn't lost on Buffett, Charlie Munger and the rest of Berkshire's investment team.

On the other hand, Apple, which Berkshire first took a stake in during the first quarter in 2016, has seen its FCF rise from $33.3 billion in fiscal 2011 (ended in Sep. 2011) to $51.1 billion in fiscal 2017. And in spite of recent iPhone X sales pressures, analysts on average expect Apple's FCF to rise 13% in fiscal 2018 to $57.8 billion.

Verisign, for its part, has seen its FCF grow 48% over the last five years to $720 million. Verisk's has risen by 42% over that time to $560 million.

But it's not just FCF growth that sets Apple, Verisign and Verisk apart from IBM. Each company also possesses a business model that makes it relatively immune to technological disruption.

Though Apple's reliance on major chip, hardware and software engineering investments certainly make it a tech company, the moat provided by its brand, ecosystem stickiness and sky-high customer loyalty in some ways make its investment profile closer to that of a marquee consumer brand. That's especially true as its services (the App Store, Apple Music, iCloud, AppleCare, etc.) strengthen customer loyalty and open up new recurring revenue streams.

Likewise, Verisign's long-term contracts to control the .com and .net domain registries provide its business with a level of predictability that many tech firms would envy (I recently argued that this predictability could make the company an attractive target for private equity). And Verisk's proprietary insurance risk data and long-term customer relationships have proven themselves over the years to be large moats against would-be rivals.

In addition, Alphabet/Google (GOOGL) , the tech giant that Buffett and Munger have lamented not investing in when it was cheaper, is another company with a giant moat. The company's core search business is close to a natural monopoly, thanks to both its scale and data. YouTube, which together with mobile search has been driving most of Google's recent revenue growth, also qualifies as a natural monopoly.

Some IBM businesses, such as its mainframe and transaction processing software units, do have healthy moats and high levels of customer stickiness. And the company's long-term relationships with many big enterprises and institutions aren't easy to unravel. But as the top-line pressures seen in recent years drive home, IBM remains vulnerable to competitive pressure and technological disruption to a greater degree than other Berkshire tech holdings.

Adoption of Amazon Web Services (AWS) and other major public cloud infrastructure platforms has weighed on a number of IBM businesses, and will continue to do so. Big Blue has also faced stiff competition in key software businesses from the likes of Microsoft  (MSFT) and Oracle (ORCL) , and in major services businesses from the likes of Accenture (ACN) and Infosys (INFY) .

IBM isn't clueless about such pressures, and has been leaning heavily on M&A and partnerships to improve its competitive footing and increase its exposure to faster-growing IT markets. But contemplating and analyzing the long-term impact of such challenges is outside of Buffett's traditional wheelhouse.

And after several years of seeing Berkshire's IBM bet underperform, it looks like the Oracle would rather stick to the kind of tech investments that don't put him too far outside of his historical comfort zone.

Jim Cramer and the AAP team hold positions in Apple, Alphabet and Microsoft for their Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells AAPL, GOOGL and MSFT? Learn more now.

More from Stocks

Trump's 'Space Force' Could Launch a $1 Trillion Industry, Morgan Stanley Says

Trump's 'Space Force' Could Launch a $1 Trillion Industry, Morgan Stanley Says

Abiomed Stock Should Rise Some 12% From Here, Piper Jaffray Analyst Says

Abiomed Stock Should Rise Some 12% From Here, Piper Jaffray Analyst Says

Video: Here Is Why Carvana Isn't Worried About Amazon

Video: Here Is Why Carvana Isn't Worried About Amazon

Video: What Oprah's Content Partnership With Apple Means for the Rest of Tech

Video: What Oprah's Content Partnership With Apple Means for the Rest of Tech

REPLAY: Jim Cramer on the Markets, Oil, Starbucks, Tesla, Okta and Red Hat

REPLAY: Jim Cramer on the Markets, Oil, Starbucks, Tesla, Okta and Red Hat