General Mills is planning to use only cage-free eggs in its U.S. products.

The maker of products like Cheerios, Yoplait yogurt and Pillsbury baking doughs will stop buying eggs that come from caged hens, the company announced Tuesday.

The company did not reveal when it would make the switch. General Mills' sourcing director, Steve Peterson, said the company sees it as a "long-term goal."

As one of the country's largest food makers, General Mills joins other big brands that have made similar pledges. Those companies include Starbucks (SBUX), Dunkin' Donuts, Kellogg, Nestle and Walmart (WMT).

Peterson, who worked as a turkey farmer in Minnesota before joining General Mills, said an egg shortage will be a "challenge" in carrying out the new policy.

An avian flu outbreak caused egg prices to skyrocket last month. Midwestern farms were hit the hardest, and more than 11% of egg-producing birds had to be killed off. Egg prices have since dropped nearly to pre-outbreak levels in July.

General Mills plans to expand its commitment to give farm animals "five freedoms," a policy outlined by the Humane Society. One of those freedoms is "sufficient space" and "comfortable living conditions."

The company already buys only free-range eggs for its Haagen-Dazs Ice Cream in Europe.

Free-range farms typically go further than cage-free farms by giving hens outdoor access. Definitions of both terms are spelled out by the USDA, but the labeling isn't enforced. "Organic" is the only egg label related to animal welfare monitored by the government.

There are at least five organizations in the U.S. that certify cage-free farms, but Peterson said General Mills works directly with its U.S. suppliers and will be able to ensure its eggs are true to their label.

The Humane Society applauded General Mills' decision.