Store spaghetti in an airtight container in the fridge. This keeps it fresh and prevents odors from affecting it.