Dried lentils will last 2 to 3 years in the pantry if they're kept dry and cool. Once cooked, they will keep for 5 to 7 days in a covered container in the refrigerator. You can also freeze cooked lentils in a sealed freezer bag for up to 3 months.