Whoa! Spaghetti in the freezer? It'll keep like ten years in a pantry.
Old story.
Once when I was young and lived in Lincoln, one place I lived got "weevils," little white larvae in the cupboards.
Since I've always been lucky enough to live in places with superlarge refrigerators, I've put boxed food into the refrigerator, bottom or top; wherever there's room.
I put breakfast cereal in the bottom part.
It doesn't hurt anything, and no bugs get into any of it.
Not many people can do that, but I have the room.