It really all depends on storage and the food item itself.
There is a guy on the internet who routinely gets old food kits for GI's from an army surplus store, usually Korean or Vietnam war era. The are vacuum packed, but he opens them and tries the food that it contains. Much of it is still edible.
THAT stuff wasn’t edible when it was edible, so to speak!