An open jar of pesto can last several weeks in the refrigerator. Since air causes pesto to taste less fresh, keep pesto in a small jar, press a sheet of plastic wrap against the pesto's surface, then tightly secure the lid.