Dried pasta lasts in the pantry for years. But Cooked pasta in its different types should be stored in the fridge for less than one week as following:
-Fresh homemade wheat pasta lasts for 4-5 days.
-Fresh storebought wheat pasta lasts for 1-3 days.
-Cooked wheat pasta lasts for 3-5 days.
-Lentil, bean or pea based pasta lasts for 3-5 days.
-Gluten free pasta lasts for 3-5 days.
-Tortellini or other stuffed pasts lasts for 3-5 days.
-Lasagna or other cooked pasta with sauce lasts for 5 days.