Cooked pasta should be kept refrigerated in an airtight container for up to two days and consumed within that time frame. The pasta should be tossed in extra-virgin olive oil before being kept to prevent it from clumping together after it has been cooked but before it has been mixed with sauce