Cooked pasta should not be left in room temperature for more than 2 hours. If you have leftovers, allow them to cool and then store in the refrigerator.