In a large mixing bowl, combine the leftover mashed potatoes, shredded cheddar cheese, chopped green onions, all-purpose flour, beaten egg, salt, and black pepper. Mix until all the ingredients are well combined.
Form the mixture into small patties, about 1/2 inch thick and 3-4 inches in diameter.
In a large skillet, heat 2-3 tablespoons of vegetable oil over medium-high heat.
Carefully place the potato cakes in the hot skillet, ensuring they have enough space around them to cook evenly. Cook for about 3-4 minutes on each side, or until they are golden brown and crispy. Use a spatula to flip them.
Once the potato cakes are crispy and golden on both sides, transfer them to a plate lined with paper towels to drain any excess oil.
Serve your pan-fried mashed potato cakes hot, garnished with additional chopped green onions and a side of sour cream if desired.