Taking a page from Japanese bento cookbooks, I froze leftover spaghetti in foil liners set in mini muffin tins. Once they're frozen through, I put them in shallow tupperware for longer-term storage likethis. Then I have a cache of homemade pasta ready to drop into my son's lunches when I'm looking for a red-colored dish. They thaw by the time he's ready to eat.
Full details on freezing spaghetti cups here.