How to get rid of the insects in cereals ?

buy porridge, immediately pour into a clean jar and close. After a short time open to cook, and there crawling small brown insects, to be thrown away. How to deal with them?