Guinea pigs need a diverse diet to be healthy. However, sometimes it just does not make sense to buy them a bag of oranges when they can only eat a segment at a time without the sugar overload. Feeding guinea pigs food scraps is an economical way to supply the varied diet.
Food to Keep Away from Guinea Pigs
While feeding guinea pigs food scraps is practical, there are certain foods your guinea pig should never eat. This section is a brief overview, but you should always check the food if you are unsure.
Potatoes are naturally toxic to mammals. This toxicity developed as a defense mechanism for the potato, and humans solve it by cooking. Unfortunately, guinea pigs cannot process cooked food, so there’s no way to make potatoes safe for them to enjoy.
Bulb plants like garlic and onions are also a bad idea. These can cause blood disorders in guinea pigs, which lead to lifelong consequences. Even a little of bulb vegetables is too much.
Gas causing plants are also potentially problematic. Guinea pigs do not have the same gas release options that humans do, so the gas can build up in their intestinal tract to the point of discomfort. In rare cases, the gas pressure is simply too much and ruptures something. To avoid this issue, keep beans and cruciferous vegetables like broccoli away from guinea pigs.
Guinea pigs are also strict herbivores and did not evolve to process anything else. That means dairy, meat, and other animal products should never enter their cage.

From the Trimmings
When you’re trimming vegetables or fruits for a meal is the best time to give some to the guinea pigs. For example, you might provide the stems off the spinach or the ends of a squash to your guinea pigs. Just make sure you retrieve anything too hard for them to eat after your meal.
Of course, you should never give your guinea pigs anything you suspect is rotten. Their digestive tracts are not equipped for that.

Feeding Guinea Pigs Food Scraps After Cooking
Feeding guinea pigs food scraps after cooking is a trickier proposition. Guinea pig digestive systems did not evolve to handle cooked food in the slightest, nor can guinea pigs manage the seasoning like humans do. The extras like salt can cause their digestive system distress in the quantities humans eat.
About the only things you might consider feeding is items that have no seasoning and that do not change while cooking. That means if you simply boiled the peas in unsalted water, you could consider feeding the leftovers to your guinea pigs but do so infrequently.