Eating stale spaghetti probably won't make you sick, but it won't taste that great, either. To avoid allowing spaghetti to go stale, keep it in a sealed plastic container after opening the package. Pasta with a high fiber content also keeps longer than other pastas. Dried pasta has a much longer shelf life than cooked pasta. Always keep cooked pasta refrigerated to prevent it from spoiling too quickly.
The first way to tell if pasta is past its prime is by looking at the expiration date on the package. Most pasta manufacturers give it a use-by date of two years after manufacture. If the package is open already, check to see if the pasta is crumbly. That is a sign that the pasta is most likely too old to eat.
Try the bend test. Most noodles give a bit under pressure before breaking. Gently bend the noodle and determine its flexibility. If the noodles have zero give, they are most likely too old.
Test the spaghetti by smelling it. Stale pasta may exude more of a dusty odor if it has been exposed to air for too long. Next try the taste test. If you notice an musty taste, or if the pasta crunches more than normal between your teeth, then pass on it
Finally cook some of the pasta to see if it is too old to eat. If the noodles stick together or take a longer time than usual to cook, it's likely that they are old. Also pay attention to any residue that may appear in the boiling water. If the pasta appears to be shedding, this is another sign of old spaghetti.