Adding lemon juice to pesto does indeed increase its shelf life! Lemons are high in acidity, and this helps to preserve the pesto by preventing the growth of bacteria. So if you're looking to extend the life of your pesto, a little squeeze of lemon juice is a good way to do it. With the addition of lemon juice, you can expect your pesto to last for up to two weeks. But if you're looking to keep it fresh for even longer, you can always freeze it.