(CNN) Three people died in the past year from a listeria outbreak that has been potentially linked to Blue Bell Creameries products, according to the Kansas Department of Health and Environment. The ice cream company issued a recall for several frozen snacks but said many of its other products are not affected.

A total of five people contracted the serious infection. All of them had been patients at a Kansas hospital and most of them consumed ice cream while being treated for unrelated causes between January 2014 and January of this year, according to KDHS. The agency did not specify when the deaths occurred.

"The hospital was not aware of the listeriosis contamination. The outbreak was recently discovered after two patients were identified with the same strain of listeriosis," KDHS said.

The ice cream products were made in Texas on a single production line at the Blue Bell Creameries plant in Brenham, according to the Texas Department of State Health Services.

The federal Food and Drug Administration said Blue Bell has removed potentially contaminated products by picking them up "directly from the retailers and hospital settings it serves. The company has also shut down the production line where the products were made."

Read More