As long as cans aren’t swollen the food is likely safe, though the nutritional value will diminish somewhat. If you have canned fruits and vegetables that you don’t want, they can make a very good start to a compost pile so you can start your own small garden.
What ^he said!