How long can cooked spaghetti be left at room temperature? Bacteria grow rapidly at temperatures between 40 °F and 140 °F; cooked spaghetti should be discarded if left out for more than two hours at room temp.