Fresh spaghetti from the supermarket can be kept in the fridge for two to three days. This is due to the fact that it has previously been semi-cooked to extend its shelf life. Homemade pasta, on the other hand, can only be kept for one to two days (though we encourage eating it within 18 hours if you can!).