Yes, freezing uncooked rice is the best way to kill bugs and keep them at bay. If you are struggling with bugs when you store them in the pantry, leave them in the freezer for a couple of days. Once you sift through the rice and get rid of all the dead bugs, you can dry them and freeze them for the long term.