Billionaire Carl Icahn, who has been buying large amounts of Apple stock over the past three years, today told CBNC that he sold his stake in the company.

"We no longer have a position in Apple," Icahn told CNBC's "Power Lunch" on Thursday, noting Apple is a "great company" and CEO Tim Cook is "doing a great job."

Icahn, who sold his shares earlier this year, said that he did so based on worries over China's attitude towards Apple. Earlier this month, the Chinese State Administration of Press, Publication, Radio, Film and Television forced Apple to take down the iTunes Movies and iBooks stores, and Chinese officials believe that Apple is "too deeply established" in core industries in the country.

Apple sales also fell 26 percent in greater China in the second quarter of 2016.

"You worry a little bit -- and maybe more than a little -- about China's attitude," Icahn said, later adding that China's government could "come in and make it very difficult for Apple to sell there... you can do pretty much what you want there." He added, though, that if China "was basically steadied," he would buy back into Apple.

Prior to exiting his position, Icahn held 0.8 percent of outstanding shares. He told CNBC that he made approximately $2 billion on Apple and that he continues to view the stock as "cheap."

Apple shares have been on the decline since Tuesday's earnings call, where the company announced its first ever drop in iPhone sales and its first year-over-year revenue drop in 13 years. Apple stock is down approximately 2 percent today.