Mashed potatoes once prepared and cooked will last up to 4 days in the refrigerator before they start to go bad.
So eat the mashed potatoes within 4 days so that they don't go bad.
If you have instant mashed potatoes in a bag or box they will last for a year or two before they start to go bad.
Once cooked though the mashed potatoes whether fresh mashed potatoes or instant mashed potatoes should be eaten within 4 days before they go bad.
Mashed potatoes will usually be okay after 4 days in the refrigerator but they won't be as fresh and if they have grown mold on the mashed potatoes then they should be thrown out.
Place the cooked mashed potatoes in a clean, covered container, and store them in the refrigerator within 2 hours of cooking for best results.